summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2005-11-04 09:41:00 +0000
committerdavidxu <davidxu@FreeBSD.org>2005-11-04 09:41:00 +0000
commitae161ac2394e00bb3afca0667a13243d7963dfe2 (patch)
tree71fac15496379ce07a2aa8da1c428250c9de46a5 /lib
parent40db0365d4b9fcce49ec895c834e40001ae50dc0 (diff)
downloadFreeBSD-src-ae161ac2394e00bb3afca0667a13243d7963dfe2.zip
FreeBSD-src-ae161ac2394e00bb3afca0667a13243d7963dfe2.tar.gz
Fix name compatible problem with POSIX standard. the sigval_ptr and
sigval_int really should be sival_ptr and sival_int. Also sigev_notify_function accepts a union sigval value but not a pointer.
Diffstat (limited to 'lib')
-rw-r--r--lib/libthr/thread/thr_timer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libthr/thread/thr_timer.c b/lib/libthr/thread/thr_timer.c
index de8fad1..80e4bd0 100644
--- a/lib/libthr/thread/thr_timer.c
+++ b/lib/libthr/thread/thr_timer.c
@@ -47,7 +47,7 @@ struct thread_node {
struct timer {
union sigval value;
- void (*function)(union sigval *, int);
+ void (*function)(union sigval, int);
int timerid;
long flags;
int gen;
@@ -122,7 +122,7 @@ __timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
* Here we pass second parameter an overrun count, this is
* not required by POSIX.
*/
- tmr->function = (void (*)(union sigval *, int))
+ tmr->function = (void (*)(union sigval, int))
evp->sigev_notify_function;
tmr->flags = 0;
tmr->timerid = -1;
@@ -147,7 +147,7 @@ __timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
ev.sigev_notify = SIGEV_THREAD_ID;
ev.sigev_signo = SIGTIMER;
ev.sigev_notify_thread_id = (lwpid_t)tmr->tn->thread->tid;
- ev.sigev_value.sigval_int = tmr->gen;
+ ev.sigev_value.sival_int = tmr->gen;
ret = __sys_timer_create(clockid, &ev, &tmr->timerid);
if (__predict_false(ret != 0 || register_timer(tmr) != 0)) {
ret = errno;
@@ -355,11 +355,11 @@ service_loop(void *arg)
TIMERS_LOCK(curthread);
if (si.si_timerid >= 0 && si.si_timerid < timer_max &&
(tmr = timer_list[si.si_timerid]) != NULL &&
- si.si_value.sigval_int == tmr->gen) {
+ si.si_value.sival_int == tmr->gen) {
tmr->flags |= WORKING;
TIMERS_UNLOCK(curthread);
tn->curtmr = tmr;
- tmr->function(&tmr->value, si.si_overrun);
+ tmr->function(tmr->value, si.si_overrun);
tn->curtmr = NULL;
TIMERS_LOCK(curthread);
tmr->flags &= ~WORKING;
OpenPOWER on IntegriCloud