Hi all,
i want know how to use threads on my kernel , for example to call two functions at the same time .
Thanks for any reply .
How to use threads ?
Re:How to use threads ?
Are you serious?
::)
Have you coded multithreading in user space, before?
::)
Have you coded multithreading in user space, before?
Every good solution is obvious once you've found it.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:How to use threads ?
i'd recommend you to get a look at OSFAQ:ContextSwitching and see if that makes sense for you.
And indeed, as Solar said, the way you ask your question sounds like you were thinking of black magic beyond the word "thread", so make sure you're familiar with the notions of dead-locks, synchronisation primitives such as sempahores and mutexes and that you have no hesitation whether code of your own is or isn't reentrant before you start meddling with multitask support.
Iirc from your previous post, you're french-speaker, no? If that's the case, i suggest you check the articles serie about ENIX/SOS (see http://sos.enix.org/) from Linux Magazine...
And indeed, as Solar said, the way you ask your question sounds like you were thinking of black magic beyond the word "thread", so make sure you're familiar with the notions of dead-locks, synchronisation primitives such as sempahores and mutexes and that you have no hesitation whether code of your own is or isn't reentrant before you start meddling with multitask support.
Iirc from your previous post, you're french-speaker, no? If that's the case, i suggest you check the articles serie about ENIX/SOS (see http://sos.enix.org/) from Linux Magazine...
Re:How to use threads ?
Yes , in C++ , i used PThreads ( Posix Threads ) .Solar wrote: Have you coded multithreading in user space, before?
I'ill look at the "Context Switching" article on the OsFaq .
Thanks for the replys .
Re:How to use threads ?
I found a great article about multitasking , here's the link : http://www.osdever.net/tutorials/multit ... ?the_id=84 .
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:How to use threads ?
(hehe ... beyond infinity's tutorial ... yep. I think it is mentionned on the FAQ)