Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I did install Fedora 5 distribution my my computer. I did try to do some realtime programing now. However, I can't pass the compiler because the glibc doesn't support all realtime commands. I can't pass it because gcc don't know the shm_open() and sem_wait(), etc. Anybody know how to make them work??
Are you talking about using shared memory and a cross process semaphore in Linux? If so check out the book Advanced Linux Programming (you can find it for free on the web), Chapter 5 - Interprocess communication. Section 5.1 discusses using shared memory, section 5.2 discusses interprocess semaphores.
I hope you know that FC5 is not a real time distribution and does not have real time extensions built in, but depending on your real time requirements it may work for you.
Thank you, Denes. I can use gcc -lrt programm.c to pass the complier. Could we install some library or complier under the FC5 to make it work for realtime programming?
There is a library out there called RTAI which has promise but I have never personally used it, although I know someone who has and they had a rough time with certain hardware incompabilities. I believe there are others.
There is a Linux distribution devoted specifically to real time called RedHawk, but it is not free.
There is also another one called LynxOS (also not free) that has a POSIX layer for application compatibility. I have used this OS and it works but only supports limited hardware since it's device drivers are not Linux compatible.
Anyway, as I said before, Linux will generally give you good, but not guaranteed performance. And again it all depends on your real time requirements.
If so check out the book Advanced Linux Programming (you can find it for free on the web), Chapter 5 - Interprocess communication. Section 5.1 discusses using shared memory,
This only talks about Sys V shared memory - how about a pointer for Posix shared memory?
RTLinux and RTAI provides you the real time linux capabilities. But you need to compile a separate kernel and patch the rtlinux.
frankly tel you its a little bit tough job for beginners, initially.
Did you tried, -lrt option?
You should have to install glibc-2.2 or later version for supporting this real time libraries.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.