]> git.sur5r.net Git - openldap/blob - servers/slapd/init.c
Changed FD_SETSIZE checks for consistency. Added checks where needed.
[openldap] / servers / slapd / init.c
1 /* init.c - initialize various things */
2
3 #include <stdio.h>
4 #include <string.h>
5 #include <sys/time.h>
6 #include <sys/types.h>
7 #include <sys/socket.h>
8 #include <netinet/in.h>
9 #include <arpa/inet.h>
10 #include <netdb.h>
11 #include "portable.h"
12 #include "slap.h"
13
14 extern pthread_mutex_t  active_threads_mutex;
15 extern pthread_mutex_t  new_conn_mutex;
16 extern pthread_mutex_t  currenttime_mutex;
17 extern pthread_mutex_t  entry2str_mutex;
18 extern pthread_mutex_t  replog_mutex;
19 extern pthread_mutex_t  ops_mutex;
20 extern pthread_mutex_t  num_sent_mutex;
21 #ifndef sunos5
22 extern pthread_mutex_t  regex_mutex;
23 #endif
24
25 init()
26 {
27         pthread_mutex_init( &active_threads_mutex, pthread_mutexattr_default );
28         pthread_mutex_init( &new_conn_mutex, pthread_mutexattr_default );
29         pthread_mutex_init( &currenttime_mutex, pthread_mutexattr_default );
30         pthread_mutex_init( &entry2str_mutex, pthread_mutexattr_default );
31         pthread_mutex_init( &replog_mutex, pthread_mutexattr_default );
32         pthread_mutex_init( &ops_mutex, pthread_mutexattr_default );
33         pthread_mutex_init( &num_sent_mutex, pthread_mutexattr_default );
34 #ifndef sunos5
35         pthread_mutex_init( &regex_mutex, pthread_mutexattr_default );
36 #endif
37 }