Back to index

openldap  2.4.31
Defines | Functions
threads.c File Reference
#include "portable.h"
#include <stdio.h>
#include <ac/stdarg.h>
#include <ac/stdlib.h>
#include <ac/string.h>
#include <ac/unistd.h>
#include "ldap_pvt_thread.h"
#include "ldap_thr_debug.h"

Go to the source code of this file.

Defines

#define LDAP_THREAD_IMPLEMENTATION

Functions

int ldap_pvt_thread_initialize (void)
int ldap_pvt_thread_destroy (void)
int ldap_pvt_thread_get_concurrency (void)
int ldap_pvt_thread_set_concurrency (int concurrency)
unsigned int ldap_pvt_thread_sleep (unsigned int interval)

Define Documentation

Definition at line 80 of file threads.c.


Function Documentation

Definition at line 67 of file threads.c.

{
#ifndef LDAP_THREAD_HAVE_TPOOL
       (void) ldap_int_thread_pool_shutdown();
#endif
       return ldap_int_thread_destroy();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 86 of file threads.c.

{
       return 1;
}

Here is the caller graph for this function:

Definition at line 37 of file threads.c.

{
       int rc;
       static int init = 0;
       ldap_pvt_thread_rmutex_t rm;
       ldap_pvt_thread_t tid;

       /* we only get one shot at this */
       if( init++ ) return -1;

       rc = ldap_int_thread_initialize();
       if( rc ) return rc;

#ifndef LDAP_THREAD_HAVE_TPOOL
       rc = ldap_int_thread_pool_startup();
       if( rc ) return rc;
#endif

       /* kludge to pull symbol definitions in */
       ldap_pvt_thread_rmutex_init( &rm );
       tid = ldap_pvt_thread_self();
       ldap_pvt_thread_rmutex_lock( &rm, tid );
       ldap_pvt_thread_rmutex_trylock( &rm, tid );
       ldap_pvt_thread_rmutex_unlock( &rm, tid );
       ldap_pvt_thread_rmutex_unlock( &rm, tid );
       ldap_pvt_thread_rmutex_destroy( &rm );

       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 94 of file threads.c.

{
       return 1;
}

Here is the caller graph for this function:

Definition at line 106 of file threads.c.

{
       sleep( interval );
       return 0;
}