diff options
Diffstat (limited to 'linuxthreads/sysdeps/pthread')
-rw-r--r-- | linuxthreads/sysdeps/pthread/tst-timer.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/linuxthreads/sysdeps/pthread/tst-timer.c b/linuxthreads/sysdeps/pthread/tst-timer.c index 803b411b5a..73e2aab0e7 100644 --- a/linuxthreads/sysdeps/pthread/tst-timer.c +++ b/linuxthreads/sysdeps/pthread/tst-timer.c @@ -1,5 +1,5 @@ /* Tests for POSIX timer implementation. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kaz Kylheku <kaz@ashi.footprints.net>. @@ -66,17 +66,7 @@ main (void) .sigev_notify = SIGEV_SIGNAL, .sigev_signo = ZSIGALRM }; - struct sigevent sigev2 = - { - .sigev_notify = SIGEV_THREAD, - ._sigev_un = - { - ._sigev_thread = - { - ._function = notify_func - } - } - }; + struct sigevent sigev2; struct itimerspec itimer1 = { { 0, 200000000 }, { 0, 200000000 } }; struct itimerspec itimer2 = { { 0, 100000000 }, { 0, 500000000 } }; struct itimerspec itimer3 = { { 0, 150000000 }, { 0, 300000000 } }; @@ -84,6 +74,9 @@ main (void) retval = clock_gettime (CLOCK_REALTIME, &ts); + sigev2.sigev_notify = SIGEV_THREAD; + sigev2.sigev_notify_function = notify_func; + setvbuf (stdout, 0, _IOLBF, 0); printf ("clock_gettime returned %d, timespec = { %ld, %ld }\n", |