]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap_r/thr_pth.c
Replace sched_yield(2) on Linux with select(2) (ITS#3950)
[openldap] / libraries / libldap_r / thr_pth.c
index 82dee868c78e9c9f12c00256b840a196cf7bc7ba..57572b236ca906c791f0e610ef11c62657cddc68 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2005 The OpenLDAP Foundation.
+ * Copyright 1998-2006 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 
 #if defined( HAVE_GNU_PTH )
 
-#include "ldap_pvt_thread.h"
+#include "ldap_pvt_thread.h" /* Get the thread interface */
+#define LDAP_THREAD_IMPLEMENTATION
+#define LDAP_THREAD_RDWR_IMPLEMENTATION
+#include "ldap_thr_debug.h"     /* May rename the symbols defined below */
+
 #include <errno.h>
 
 /*******************
@@ -38,7 +42,7 @@ ldap_int_thread_initialize( void )
        }
        detach_attr = pth_attr_new();
        joined_attr = pth_attr_new();
-#if LDAP_PVT_THREAD_STACK_SIZE
+#ifdef LDAP_PVT_THREAD_SET_STACK_SIZE
        pth_attr_set( joined_attr, PTH_ATTR_STACK_SIZE, LDAP_PVT_THREAD_STACK_SIZE );
        pth_attr_set( detach_attr, PTH_ATTR_STACK_SIZE, LDAP_PVT_THREAD_STACK_SIZE );
 #endif