~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/my_pthread.h

  • Committer: Brian Aker
  • Date: 2010-10-28 17:12:01 UTC
  • mfrom: (1887.1.3 merge)
  • Revision ID: brian@tangent.org-20101028171201-baj6l1bnntn1s4ad
Merge in POTFILES changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
/* Defines to make different thread packages compatible */
17
17
 
18
 
 
19
 
 
20
18
#ifndef DRIZZLED_INTERNAL_MY_PTHREAD_H
21
19
#define DRIZZLED_INTERNAL_MY_PTHREAD_H
22
20
 
23
21
#include <unistd.h>
24
22
 
25
 
#include <boost/date_time.hpp>
26
 
 
27
23
#ifndef ETIME
28
24
#define ETIME ETIMEDOUT                         /* For FreeBSD */
29
25
#endif
39
35
#include <synch.h>
40
36
#endif
41
37
 
42
 
#include "drizzled/visibility.h"
43
 
 
44
38
namespace drizzled
45
39
{
46
40
namespace internal
76
70
#ifndef set_timespec_nsec
77
71
#define set_timespec_nsec(ABSTIME,NSEC) \
78
72
{\
79
 
  boost::posix_time::ptime mytime(boost::posix_time::microsec_clock::local_time());\
80
 
  boost::posix_time::ptime epoch(boost::gregorian::date(1970,1,1));\
81
 
  uint64_t t_mark= (mytime-epoch).total_microseconds();\
82
 
  uint64_t now= t_mark + (NSEC/100); \
 
73
  uint64_t now= my_getsystime() + (NSEC/100); \
83
74
  (ABSTIME).tv_sec=  (time_t) (now / 10000000UL);                  \
84
75
  (ABSTIME).tv_nsec= (long) (now % 10000000UL * 100 + ((NSEC) % 100)); \
85
76
}
110
101
 
111
102
extern bool my_thread_global_init(void);
112
103
extern void my_thread_global_end(void);
113
 
DRIZZLED_API bool my_thread_init(void);
114
 
DRIZZLED_API void my_thread_end(void);
 
104
extern bool my_thread_init(void);
 
105
extern void my_thread_end(void);
115
106
extern const char *my_thread_name(void);
116
107
 
117
108
/* All thread specific variables are in the following struct */