apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/threadproc/netware thread.c
Date Fri, 05 Oct 2001 16:57:40 GMT
bnicholes    01/10/05 09:57:40

  Modified:    threadproc/netware thread.c
  Log:
  Fixed NetWare thread handling so that it can deal with multiple argument
  thread functions
  
  Revision  Changes    Path
  1.6       +11 -2     apr/threadproc/netware/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/netware/thread.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- thread.c	2001/10/04 00:06:24	1.5
  +++ thread.c	2001/10/05 16:57:40	1.6
  @@ -89,6 +89,12 @@
       return APR_NOTDETACH;
   }
   
  +static void *dummy_worker(void *opaque)
  +{
  +    apr_thread_t *thd = (apr_thread_t *)opaque;
  +    return thd->func(thd, thd->data);
  +}
  +
   apr_status_t apr_thread_create(apr_thread_t **new,
    											apr_threadattr_t *attr, 
                                				apr_thread_start_t func,
  @@ -123,6 +129,9 @@
       }
       
       (*new)->cntxt = cont;
  +    (*new)->data = data;
  +    (*new)->func = func;
  +    (*new)->thread_name = (char*)apr_pstrdup(cont, threadName);
       
       stat = apr_pool_create(&(*new)->cntxt, cont);
       if (stat != APR_SUCCESS) {
  @@ -134,8 +143,8 @@
       }
       
       (*new)->ctx = NXContextAlloc(
  -    	/* void(*start_routine)(void *arg)*/(void (*)(void *)) func,
  -     	/* void *arg */										   data,
  +    	/* void(*start_routine)(void *arg)*/(void (*)(void *)) dummy_worker,
  +     	/* void *arg */										   (*new),
        	/* int priority */ 									   NX_PRIO_MED,
        	/* NXSize_t stackSize */							   stack_size,
        	/* long flags */									   NX_CTX_NORMAL,
  
  
  

Mime
View raw message