[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
 

Sv: [CPROG] pthread_create



Sune Fischer <sslug@sslug> skrev i en
nyhedsmeddelelse:sslug@sslug
>
> Hmm, hvordan giver man det tredie argument til
>
> int  pthread_create(pthread_t  *  thread,
> pthread_attr_t * attr, void * (*start_routine)(void
> *), void * arg);
>
> hvis nu min start_rutine har prototype:
>
> char* myrutine(int,int);
>
>
> Tak,
>
> Sune
> __________________________________________________
> Do You Yahoo!?
> Thousands of Stores.  Millions of Products.  All in one place.
> Yahoo! Shopping: http://shopping.yahoo.com
>

Så vidt jeg kan forstå, så er der problemer med "void *
(*start_routine)(void*)" delen af ovenstående.

int MyThreadCreater(void)
{
pthread_t thread;
pthread_attr_t attr;
int arg;

    pthread_create(&thread,&attr,(void *()) &myrutine,(void *) &arg);
}

char *myrutine(int,int)
{
}

Skulle løse problemet, IIRC.

Med venlig hilsen

Keld Laursen




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 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] *