[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
On Mon, May 01, 2000 at 03:49:00PM +0200, Jesper Monsted wrote: > > Det er til en applikation der skal lave dataopsamling og styring af 6 > > serielle porte og sortering af data samt kommunikation til andre processer > > der bruger disse data og styrer de serielle enheder. > > Den nemmeste måde at lave tråde i linux er noget i denne retning: > > if (fork()) > { > /* parent */ > gør noget; > } > else > { > /* child */ > gør noget andet; > return(0); > } > Tja, fast det är ju inte en tråd. Där forkar du och får två processer:-> Ska du använda trådar så gör något liknande: #include <pthread.h> void *thread_proccess(void *d) { //ny tråd } och för att starta den: pthread_t data_thread; pthread_create(&data_thread, NULL, thread_proccess, (void *) indata); Dock är forkning ej att förkasta, det beror på hur mycket de olika programsnuttarna behöver kommunicera med varandra och på vilket vis. -- Calvin: "Sometimes I think the surest ----- sign that intelligent life Bjorn exists elsewhere in the ----- universe is that none of it has ever tried to contact us"
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |