mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
/* init.c - initialize various things */
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <sys/time.h>
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
#include <netdb.h>
|
|
#include "portable.h"
|
|
#include "slap.h"
|
|
|
|
extern pthread_mutex_t active_threads_mutex;
|
|
extern pthread_mutex_t new_conn_mutex;
|
|
extern pthread_mutex_t currenttime_mutex;
|
|
extern pthread_mutex_t entry2str_mutex;
|
|
extern pthread_mutex_t replog_mutex;
|
|
extern pthread_mutex_t ops_mutex;
|
|
extern pthread_mutex_t num_sent_mutex;
|
|
#ifndef sunos5
|
|
extern pthread_mutex_t regex_mutex;
|
|
#endif
|
|
|
|
init()
|
|
{
|
|
pthread_mutex_init( &active_threads_mutex, pthread_mutexattr_default );
|
|
pthread_mutex_init( &new_conn_mutex, pthread_mutexattr_default );
|
|
pthread_mutex_init( ¤ttime_mutex, pthread_mutexattr_default );
|
|
pthread_mutex_init( &entry2str_mutex, pthread_mutexattr_default );
|
|
pthread_mutex_init( &replog_mutex, pthread_mutexattr_default );
|
|
pthread_mutex_init( &ops_mutex, pthread_mutexattr_default );
|
|
pthread_mutex_init( &num_sent_mutex, pthread_mutexattr_default );
|
|
#ifndef sunos5
|
|
pthread_mutex_init( ®ex_mutex, pthread_mutexattr_default );
|
|
#endif
|
|
}
|