[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]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Mærkeligt problem med threads



On Fri, Aug 08, 2003 at 12:07:54PM +0200, sslug@sslug wrote:
> On Fri, 8 Aug 2003, Klaus S. Madsen wrote:
> 
> > for (=0 ; i<NUM_THREADS; i++ ) 
> > {
> >  printf("CREATING THREAD: %d\n", i);
> >  pthread_create(&threads[i], NULL, fetch_start, (void*)i);
> > }
> > 
> > Og så for at få thread id'et ud i fetch_start:
> > 
> > void *fetch_start(void * threadid)
> > {
> >  printf("THREAD %d STARTED...\n", (int)threadid);
> > }
> 
> Nu sidder jeg og laver noget helt helt andet, men har du ikke præcist 
> samme problem her? Race race?
Nope. Det er ikke længere en pointer jeg sender med, istedet misbruger
den void pointer som funktionen tager, til at indeholde en integer. Så
hvis i er 0, så er min void* også 0.

-- 
/-----------------------------------------------------\
| Klaus S. Madsen      | "Failure is not an option... |
| ICQ: 45400164        |  It comes bundled with your  |
| www.hjernemadsen.org |  Microsoft products!"        |
\-----------------------------------------------------/


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *