hi out there

I have just started programming in RT linux and i have a an error.
I want some sync in my threads, and i am doing this with semaphore.
(is this the right way to it ?)

I have a line in my program

#include <semaphore.h>

and I am the using my sem_init and etc. I compile my program and there
is no error.
then i check for modules.
[root@localhost simulation]# lsmod
Module                  Size  Used by
rtl_fifo                7568   0
rtl_posixio             6916   0  [rtl_fifo]
rtl_sched              36956   0  (unused)
rtl_time               14248   0  [rtl_posixio rtl_sched]

[root@localhost simulation]# insmod simu_mod.o
simu_mod.o: unresolved symbol sem_init
simu_mod.o: unresolved symbol sem_post
simu_mod.o: unresolved symbol sem_destroy
simu_mod.o: unresolved symbol sem_wait

I can see that the problem is <semaphore.h>. but what is wrong? should i
do a linking. My compile lock like this
gcc -I/usr/src/rtlinux-2.2/linux/include -I/usr/src/rtlinux-2.2/include
-I/usr/src/rtlinux-2.2 -O2 -Wall simu_app.c -o simu_app
gcc -I/usr/src/rtlinux-2.2/linux/include -I/usr/src/rtlinux-2.2/include
-I/usr/src/rtlinux-2.2 -I/usr/src/rtlinux-2.2/linux/include
-I/usr/src/rtlinux-2.2/include -I/usr/src/rtlinux-2.2
-I/usr/src/rtlinux-2.2/include/posix -Wall -Wstrict-prototypes -O2
-D__SMP__ -D__RTL__ -D__KERNEL__ -DMODULE -pipe -fno-strength-reduce
-m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686
-fomit-frame-pointer -c simu_mod.c -o simu_mod.o

mvh Anders

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to