Fixes for NetBSD

This commit is contained in:
Michiel Broek 2003-12-23 21:21:28 +00:00
parent 530af1e724
commit 6519357e2f
3 changed files with 16 additions and 14 deletions

View File

@ -1031,9 +1031,10 @@ void *scheduler(void)
static int call_entry = MAXTASKS; static int call_entry = MAXTASKS;
double loadavg[3]; double loadavg[3];
pp_list *tpl; pp_list *tpl;
sigset_t sigset, oldset; // sigset_t sigset, oldset;
Syslog('+', "Starting scheduler thread with pid %d", (int)getpid()); Syslog('+', "Starting scheduler thread with pid %d", (int)getpid());
/*
rc = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); rc = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
if (rc) if (rc)
Syslog('+', "pthread_setcancelstate(PTHREAD_CANCEL_DISABLE) rc=%d", rc); Syslog('+', "pthread_setcancelstate(PTHREAD_CANCEL_DISABLE) rc=%d", rc);
@ -1044,7 +1045,7 @@ void *scheduler(void)
rc = pthread_sigmask(SIG_SETMASK, &sigset, &oldset); rc = pthread_sigmask(SIG_SETMASK, &sigset, &oldset);
if (rc) if (rc)
Syslog('+', "pthread_sigmask(SIG_SETMASK) rc=%d", rc); Syslog('+', "pthread_sigmask(SIG_SETMASK) rc=%d", rc);
*/
sched_run = TRUE; sched_run = TRUE;
pw = getpwuid(getuid()); pw = getpwuid(getuid());

View File

@ -338,19 +338,19 @@ void *ping_thread(void)
static char pingaddress[41]; static char pingaddress[41];
static time_t pingsend; static time_t pingsend;
time_t now; time_t now;
sigset_t sigset, oldset; // sigset_t sigset, oldset;
Syslog('+', "Starting ping thread with pid %d", (int)getpid()); Syslog('+', "Starting ping thread with pid %d", (int)getpid());
rc = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); // rc = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
if (rc) // if (rc)
Syslog('+', "pthread_setcancelstate(PTHREAD_CANCEL_DISABLE) rc=%d", rc); // Syslog('+', "pthread_setcancelstate(PTHREAD_CANCEL_DISABLE) rc=%d", rc);
rc = sigfillset(&sigset); // rc = sigfillset(&sigset);
if (rc) // if (rc)
Syslog('+', "sigfillset() rc=%d", rc); // Syslog('+', "sigfillset() rc=%d", rc);
rc = pthread_sigmask(SIG_SETMASK, &sigset, &oldset); // rc = pthread_sigmask(SIG_SETMASK, &sigset, &oldset);
if (rc) // if (rc)
Syslog('+', "pthread_sigmask(SIG_SETMASK) rc=%d", rc); // Syslog('+', "pthread_sigmask(SIG_SETMASK) rc=%d", rc);
pingresult[1] = pingresult[2] = FALSE; pingresult[1] = pingresult[2] = FALSE;
pingnr = 2; pingnr = 2;

View File

@ -583,9 +583,10 @@ void *cmd_thread(void)
int rlen, rc; int rlen, rc;
struct pollfd pfd; struct pollfd pfd;
static char buf[2048]; static char buf[2048];
sigset_t sigset, oldset; // sigset_t sigset, oldset;
Syslog('+', "Starting cmd thread with pid %d", (int)getpid()); Syslog('+', "Starting cmd thread with pid %d", (int)getpid());
/*
rc = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); rc = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
if (rc) if (rc)
Syslog('+', "pthread_setcancelstate(PTHREAD_CANCEL_DISABLE) rc=%d", rc); Syslog('+', "pthread_setcancelstate(PTHREAD_CANCEL_DISABLE) rc=%d", rc);
@ -596,7 +597,7 @@ void *cmd_thread(void)
rc = pthread_sigmask(SIG_SETMASK, &sigset, &oldset); rc = pthread_sigmask(SIG_SETMASK, &sigset, &oldset);
if (rc) if (rc)
Syslog('+', "pthread_sigmask(SIG_SETMASK) rc=%d", rc); Syslog('+', "pthread_sigmask(SIG_SETMASK) rc=%d", rc);
*/
cmd_run = TRUE; cmd_run = TRUE;
while (! T_Shutdown) { while (! T_Shutdown) {