apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject cvs commit: apr/threadproc/beos thread.c
Date Tue, 24 Jul 2001 10:53:06 GMT
dreid       01/07/24 03:53:06

  Modified:    threadproc/beos thread.c
  Log:
  dummy_func != dummy_worker
  
  I'm sorry, but this change seems crazy to me.  Know I haven't been following
  the discussion that closely - how many patches???? - but this doesn't feel
  right.  Adding more indirections to gain what exactly?
  
  Revision  Changes    Path
  1.24      +7 -7      apr/threadproc/beos/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/beos/thread.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- thread.c	2001/07/24 05:16:32	1.23
  +++ thread.c	2001/07/24 10:53:06	1.24
  @@ -88,25 +88,25 @@
   	return APR_NOTDETACH;
   }
   
  -void *dummy_worker(void *opaque)
  +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, void *data,
  -                             apr_pool_t *cont)
  +                               apr_thread_start_t func, void *data,
  +                               apr_pool_t *pool)
   {
       int32 temp;
       apr_status_t stat;
       
  -    (*new) = (apr_thread_t *)apr_palloc(cont, sizeof(apr_thread_t));
  +    (*new) = (apr_thread_t *)apr_palloc(pool, sizeof(apr_thread_t));
       if ((*new) == NULL) {
           return APR_ENOMEM;
       }
   
  -    (*new)->cntxt = cont;
  +    (*new)->cntxt = pool;
       (*new)->data = data;
       (*new)->func = func;
   
  @@ -116,12 +116,12 @@
   	else
   	    temp = B_NORMAL_PRIORITY;
   
  -    stat = apr_pool_create(&(*new)->cntxt, cont);
  +    stat = apr_pool_create(&(*new)->cntxt, pool);
       if (stat != APR_SUCCESS) {
           return stat;
       }
   
  -    (*new)->td = spawn_thread((thread_func)dummy_func, "apr thread", temp, (*new));
  +    (*new)->td = spawn_thread((thread_func)dummy_worker, "apr thread", temp, (*new));
       /* Now we try to run it...*/
       if (resume_thread((*new)->td) == B_NO_ERROR) {
           return APR_SUCCESS;
  
  
  

Mime
View raw message