/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2007 The OpenLDAP Foundation.
+ * Copyright 1998-2010 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#ifndef LDAP_PVT_THREAD_H_DONE
#define LDAP_PVT_THREAD_SET_STACK_SIZE
-#ifndef LDAP_PVT_THREAD_STACK_SIZE
+/* The size may be explicitly #defined to zero to disable it. */
+#if defined( LDAP_PVT_THREAD_STACK_SIZE ) && LDAP_PVT_THREAD_STACK_SIZE == 0
+# undef LDAP_PVT_THREAD_SET_STACK_SIZE
+#elif !defined( LDAP_PVT_THREAD_STACK_SIZE )
/* LARGE stack. Will be twice as large on 64 bit machine. */
-#define LDAP_PVT_THREAD_STACK_SIZE ( 1 * 1024 * 1024 * sizeof(void *) )
-/* May be explicitly defined to zero to disable it */
-#elif LDAP_PVT_THREAD_STACK_SIZE == 0
-#undef LDAP_PVT_THREAD_SET_STACK_SIZE
+# define LDAP_PVT_THREAD_STACK_SIZE ( 1 * 1024 * 1024 * sizeof(void *) )
#endif
#endif /* !LDAP_PVT_THREAD_H_DONE */
ldap_pvt_thread_start_t *start,
void *arg ));
+LDAP_F( int )
+ldap_pvt_thread_pool_retract LDAP_P((
+ ldap_pvt_thread_pool_t *pool,
+ ldap_pvt_thread_start_t *start,
+ void *arg ));
+
LDAP_F( int )
ldap_pvt_thread_pool_maxthreads LDAP_P((
ldap_pvt_thread_pool_t *pool,
ldap_pvt_thread_pool_t *pool,
ldap_pvt_thread_pool_param_t param, void *value ));
+LDAP_F( int )
+ldap_pvt_thread_pool_pausing LDAP_P((
+ ldap_pvt_thread_pool_t *pool ));
+
LDAP_F( int )
ldap_pvt_thread_pool_backload LDAP_P((
ldap_pvt_thread_pool_t *pool ));
+LDAP_F( int )
+ldap_pvt_thread_pool_pausecheck LDAP_P((
+ ldap_pvt_thread_pool_t *pool ));
+
LDAP_F( int )
ldap_pvt_thread_pool_pause LDAP_P((
ldap_pvt_thread_pool_t *pool ));
ldap_pvt_thread_pool_keyfree_t **kfree ));
LDAP_F( int )
-ldap_pvt_thread_pool_setkey_x LDAP_P((
+ldap_pvt_thread_pool_setkey LDAP_P((
void *ctx,
void *key,
void *data,
void **olddatap,
ldap_pvt_thread_pool_keyfree_t **oldkfreep ));
-#define ldap_pvt_thread_pool_setkey( ctx, key, data, kfree ) \
- ldap_pvt_thread_pool_setkey_x( (ctx), (key), (data), (kfree), NULL, NULL )
-
LDAP_F( void )
ldap_pvt_thread_pool_purgekey LDAP_P(( void *key ));