[uClibc] problem with linux/timer.h

Kai.Niu KaiNiu at intervideo.com.cn
Thu Jun 30 09:39:08 UTC 2005



                   Now I have to use timer function to repeatedly call a
function with a certain interval. After google the internet, I find the
add_timer/mod_timer functions which is seemly used in kernel space. There
are some problems during the compiling stage. The error message is dumped as


==================error message========================================

./ap_mp3/mp3_play.c: In function `MP3_PLAY_PAUSE_run':

./ap_mp3/mp3_play.c:736: warning: assignment discards qualifiers from
pointer target type

./ap_mp3/mp3_play.c: In function `MP3_PLAY_run':

./ap_mp3/mp3_play.c:796: warning: `return' with no value, in function
returning non-void

./ap_mp3/mp3_play.c:800: warning: passing arg 3 of `pthread_create' from
incompatible pointer type

./ap_mp3/mp3_play.c:837: warning: passing arg 1 of `free' makes pointer from
integer without a cast

./ap_mp3/mp3_play.c:788: warning: unused variable `stopped'

/tmp/ccNEBIfo.o(.text+0x5a8): In function `main':

demo_main.c: undefined reference to `__mod_timer'

/tmp/ccNEBIfo.o(.text+0x934):demo_main.c: undefined reference to `del_timer'

collect2: ld returned 1 exit status


I defined the __KERNEL__ and __KERNEL_STRICT_NAMES macros to keep some
variables in header form being conflicting redefined. Now I wonder why the
compiler can not link the symbol to the corresponding libraries. Do I have
to point it out specifically? If so, could anyone tell me that which one I
need to point out? Or, there are another technical trick could let me use
"timer". Now I used signal mechanism to do timer's job, seemly work fine to
me. But I still want to know, How could I use timer in Linux system. Any
information or documentation will be greatly appreciated





VamKaier @ 30th June 2005

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20050630/2683c743/attachment-0002.htm 

More information about the uClibc mailing list