how to write a program can have 2 threads running at the same time??
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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 wonder if anyone knows how to declare two threads in linux real time programming?! My goal is to define 2 theads, one is for incrementing the clock cycle and the other one is to print out a letter in each cycle.
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602
Rep:
It depends on what threads you are running. Most distro's now ship with LinuxThreads, but if you have RT Linux it may be different. Here is a great source of info for threads - http://pauillac.inria.fr/~xleroy/linuxthreads/
Thanks
Actually I don't have any experience in real time application and now trying to do one in linux platform. So, if there's any good online tutorial regard on thread or socket, please forward the url to me.
thnaks again
man9
Quote:
Originally posted by jeremy It depends on what threads you are running. Most distro's now ship with LinuxThreads, but if you have RT Linux it may be different. Here is a great source of info for threads - http://pauillac.inria.fr/~xleroy/linuxthreads/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.