summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@montyprogram.com>2011-05-28 16:57:58 +0200
committerVladislav Vaintroub <wlad@montyprogram.com>2011-05-28 16:57:58 +0200
commitb519f2b626ebd1f3243a21dc883cefa6a26460f9 (patch)
treefaad721ece99fc071000e695861e37d45acda0e5 /include
parent152dfe58678af35769ca3cd66db592d129b4c08b (diff)
downloadmariadb-git-b519f2b626ebd1f3243a21dc883cefa6a26460f9.tar.gz
Fix compile errors and warnings and test errors introduced by microseconds push.
Also, change windows timespec definition to be Unix-ish - simplifies handling a lot.
Diffstat (limited to 'include')
-rw-r--r--include/my_pthread.h30
1 files changed, 2 insertions, 28 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index e280146c34f..139e5d08437 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -75,37 +75,11 @@ typedef volatile LONG my_pthread_once_t;
#define MY_PTHREAD_ONCE_INPROGRESS 1
#define MY_PTHREAD_ONCE_DONE 2
-/*
- Struct and macros to be used in combination with the
- windows implementation of pthread_cond_timedwait
-*/
-
-/*
- Declare a union to make sure FILETIME is properly aligned
- so it can be used directly as a 64 bit value. The value
- stored is in 100ns units.
- */
-union ft64 {
- FILETIME ft;
- __int64 i64;
-};
-
struct timespec {
- union ft64 tv;
- /* The max timeout value in millisecond for pthread_cond_timedwait */
- long max_timeout_msec;
+ time_t tv_sec;
+ long tv_nsec;
};
-#define set_timespec_time_nsec(ABSTIME,TIME,NSEC) do { \
- (ABSTIME).tv.i64= (TIME)+(__int64)(NSEC)/100; \
- (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
-} while(0)
-
-#define set_timespec_nsec(ABSTIME,NSEC) do { \
- union ft64 tv; \
- GetSystemTimeAsFileTime(&tv.ft); \
- set_timespec_time_nsec((ABSTIME), tv.i64, (NSEC)); \
-} while(0)
void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);