# HG changeset patch # User greg # Date 1255349967 -7200 # Node ID 5fec528f66cf47e6eca04ed5a8a88c587837cc89 # Parent 15a175f6305d9fe8c9ed16ca1daa08a3c15eacd2 create specific timer thread for UCLIBC support (with CLOCK_PROCESS_CPUTIME_ID parameter) diff -r 15a175f6305d -r 5fec528f66cf drivers/timers_unix/timers_unix.c --- a/drivers/timers_unix/timers_unix.c Thu Oct 08 17:34:44 2009 +0200 +++ b/drivers/timers_unix/timers_unix.c Mon Oct 12 14:19:27 2009 +0200 @@ -48,6 +48,11 @@ // Take first absolute time ref. gettimeofday(&last_sig,NULL); +#if defined(__UCLIBC__) + int ret; + ret = timer_create(CLOCK_PROCESS_CPUTIME_ID, NULL, &timer); + signal(SIGALRM, timer_notify); +#else memset (&sigev, 0, sizeof (struct sigevent)); sigev.sigev_value.sival_int = 0; sigev.sigev_notify = SIGEV_THREAD; @@ -55,6 +60,7 @@ sigev.sigev_notify_function = timer_notify; timer_create (CLOCK_REALTIME, &sigev, &timer); +#endif } void StopTimerLoop(TimerCallback_t exitfunction)