apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/threadproc/win32 thread.c
Date Tue, 27 Nov 2001 02:32:37 GMT
wrowe       01/11/26 18:32:37

  Modified:    threadproc/win32 thread.c
  Log:
    An example of why we needed a pool-less apr_os_level.
  
  Revision  Changes    Path
  1.40      +9 -2      apr/threadproc/win32/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/win32/thread.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- thread.c	2001/09/01 16:48:58	1.39
  +++ thread.c	2001/11/27 02:32:37	1.40
  @@ -59,8 +59,8 @@
   #include "apr_lib.h"
   #include "apr_portable.h"
   #include <process.h>
  +#include "misc.h"   
   
  -
   APR_DECLARE(apr_status_t) apr_threadattr_create(apr_threadattr_t **new,
                                                   apr_pool_t *cont)
   {
  @@ -175,7 +175,14 @@
   
   APR_DECLARE(void) apr_thread_yield()
   {
  -    SwitchToThread();
  +    /* SwitchToThread is not supported on Win9x, but since it's
  +     * primarily a noop (entering time consuming code, therefore
  +     * providing more critical threads a bit larger timeslice)
  +     * we won't worry too much if it's not available.
  +     */
  +    if (apr_os_level >= APR_WIN_NT) {
  +        SwitchToThread();
  +    }
   }
   
   APR_DECLARE(apr_status_t) apr_thread_data_get(void **data, const char *key,
  
  
  

Mime
View raw message