~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_pthread.h

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#ifndef DRIZZLED_INTERNAL_MY_PTHREAD_H
19
19
#define DRIZZLED_INTERNAL_MY_PTHREAD_H
20
20
 
21
 
#include <stdint.h>
22
21
#include <unistd.h>
23
22
#include <signal.h>
24
23
 
26
25
#define ETIME ETIMEDOUT                         /* For FreeBSD */
27
26
#endif
28
27
 
29
 
#ifdef  __cplusplus
30
 
#define EXTERNC extern "C"
31
 
extern "C" {
32
 
#else
33
 
#define EXTERNC
34
 
#endif /* __cplusplus */
35
 
 
36
28
#include <pthread.h>
37
29
#ifndef _REENTRANT
38
30
#define _REENTRANT
44
36
#include <synch.h>
45
37
#endif
46
38
 
 
39
namespace drizzled
 
40
{
 
41
namespace internal
 
42
{
 
43
 
47
44
#define pthread_key(T,V) pthread_key_t V
48
45
#define pthread_handler_t void *
49
46
typedef void *(* pthread_handler)(void *);
185
182
};
186
183
 
187
184
extern struct st_my_thread_var *_my_thread_var(void);
188
 
#define my_thread_var (_my_thread_var())
 
185
#define my_thread_var (::drizzled::internal::_my_thread_var())
189
186
/*
190
187
  Keep track of shutdown,signal, and main threads so that my_end() will not
191
188
  report errors with them
240
237
#define status_var_add(V,C)     (V)+=(C)
241
238
#define status_var_sub(V,C)     (V)-=(C)
242
239
 
243
 
#ifdef  __cplusplus
244
 
}
245
 
#endif
 
240
} /* namespace internal */
 
241
} /* namespace drizzled */
 
242
 
246
243
#endif /* DRIZZLED_INTERNAL_MY_PTHREAD_H */