drivers/timers_unix/timers_unix.c
changeset 610 485e9b8a3e76
parent 607 5fec528f66cf
child 631 08b6b903f84a
--- a/drivers/timers_unix/timers_unix.c	Wed Oct 14 16:37:37 2009 +0200
+++ b/drivers/timers_unix/timers_unix.c	Tue Oct 27 14:35:57 2009 +0100
@@ -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)