![]() |
| | #1 |
| Registered User Join Date: Oct 2003
Posts: 53
| Doing two things at once |
| eam is offline | |
| | #2 |
| & the hat of GPL slaying Join Date: Sep 2001
Posts: 5,732
| off the top of my head You can use select() on stdin to see if there is any data to be processed |
| Thantos is offline | |
| | #3 |
| Code Ripper Join Date: Jun 2004
Posts: 30
| hi eam, you should take a look in fork() and clone() linux syscalls. they work similar to w32 threads. jmgk |
| jmgk is offline | |
| | #4 |
| Registered User Join Date: Oct 2003
Posts: 53
| How would I do that? |
| eam is offline | |
| | #5 |
| Code Ripper Join Date: Jun 2004
Posts: 30
| eam, already tried http://www.google.com/search?q=linux+fork+syscall ? or the linux secret command "man"? ![]() jmgk |
| jmgk is offline | |
| | #6 |
| & the hat of GPL slaying Join Date: Sep 2001
Posts: 5,732
| Actually fork() and clone() are NOT like windows threads. fork() creates another process with its own memory space. If you want multi threaded applications you need to look into pthreads |
| Thantos is offline | |
| | #7 |
| Registered User Join Date: Oct 2003
Posts: 53
| Guess I have some reading to do then, thanks for pointing me in the right direction. |
| eam is offline | |
| | #8 |
| Obsessed with C Join Date: Jan 2003
Posts: 501
| Not to try and say that you are wrong Thantos, just to shed a little more light on the subject. Threads in linux are implemented as their own processes. They just so happen to have the same pid and their address space pointer points to the address space of the other process it is a thread of . They are called lightweight processes.
__________________ Help populate a c/c++ help irc channel server: irc://irc.efnet.net channel: #c |
| chrismiceli is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Suggestions for things to study | Mastadex | Windows Programming | 5 | 08-18-2008 09:23 AM |
| Plants that eat things | StinkyRyan | A Brief History of Cprogramming.com | 5 | 07-05-2004 03:41 PM |
| How are things looking | cyberCLoWn | C++ Programming | 8 | 01-15-2004 02:53 PM |
| Selecting things on the canvas | Barjor | Windows Programming | 0 | 08-30-2001 02:10 PM |
| Help with these three things... | face_master | C++ Programming | 2 | 08-26-2001 07:05 AM |