*
*/
/*
- Copyright (C) 2000-2005 Kern Sibbald
+ Copyright (C) 2004-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as ammended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
* Start a timer on a child process of pid, kill it after wait seconds.
*
* Returns: btimer_t *(pointer to btimer_t struct) on success
- * NULL on failure
+ * NULL on failure
*/
btimer_t *start_child_timer(pid_t pid, uint32_t wait)
{
wid->wd->interval = wait;
register_watchdog(wid->wd);
- Dmsg3(200, "Start child timer %p, pid %d for %d secs.\n", wid, pid, wait);
+ Dmsg3(900, "Start child timer %p, pid %d for %d secs.\n", wid, pid, wait);
return wid;
}
void stop_child_timer(btimer_t *wid)
{
if (wid == NULL) {
- Dmsg0(200, "stop_child_timer called with NULL btimer_id\n");
+ Dmsg0(900, "stop_child_timer called with NULL btimer_id\n");
return;
}
- Dmsg2(200, "Stop child timer %p pid %d\n", wid, wid->pid);
+ Dmsg2(900, "Stop child timer %p pid %d\n", wid, wid->pid);
stop_btimer(wid);
}
* Start a timer on a thread. kill it after wait seconds.
*
* Returns: btimer_t *(pointer to btimer_t struct) on success
- * NULL on failure
+ * NULL on failure
*/
btimer_t *start_thread_timer(pthread_t tid, uint32_t wait)
{
btimer_t *wid;
wid = btimer_start_common(wait);
if (wid == NULL) {
- Dmsg1(200, "start_thread_timer return NULL from common. wait=%d.\n", wait);
+ Dmsg1(900, "start_thread_timer return NULL from common. wait=%d.\n", wait);
return NULL;
}
wid->type = TYPE_PTHREAD;
wid->wd->interval = wait;
register_watchdog(wid->wd);
- Dmsg3(200, "Start thread timer %p tid %p for %d secs.\n", wid, tid, wait);
+ Dmsg3(900, "Start thread timer %p tid %p for %d secs.\n", wid, tid, wait);
return wid;
}
* Start a timer on a BSOCK. kill it after wait seconds.
*
* Returns: btimer_t *(pointer to btimer_t struct) on success
- * NULL on failure
+ * NULL on failure
*/
btimer_t *start_bsock_timer(BSOCK *bsock, uint32_t wait)
{
register_watchdog(wid->wd);
Dmsg4(50, "Start bsock timer %p tid=%p for %d secs at %d\n", wid,
- wid->tid, wait, time(NULL));
+ wid->tid, wait, time(NULL));
return wid;
}
void stop_bsock_timer(btimer_t *wid)
{
if (wid == NULL) {
- Dmsg0(200, "stop_bsock_timer called with NULL btimer_id\n");
+ Dmsg0(900, "stop_bsock_timer called with NULL btimer_id\n");
return;
}
Dmsg3(50, "Stop bsock timer %p tid=%p at %d.\n", wid, wid->tid, time(NULL));
void stop_thread_timer(btimer_t *wid)
{
if (wid == NULL) {
- Dmsg0(200, "stop_thread_timer called with NULL btimer_id\n");
+ Dmsg0(900, "stop_thread_timer called with NULL btimer_id\n");
return;
}
- Dmsg2(200, "Stop thread timer %p tid=%p.\n", wid, wid->tid);
+ Dmsg2(900, "Stop thread timer %p tid=%p.\n", wid, wid->tid);
stop_btimer(wid);
}