summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorkaa@polly.local <>2006-12-18 18:04:26 +0300
committerkaa@polly.local <>2006-12-18 18:04:26 +0300
commitd7777d14c6d11024fe7dc2cf2930523ccd7765bd (patch)
tree333ec69c4920a35d9c0d9a9f5304f4fd626f6d2a /include
parentfeb0e3a0f210c4f7c4ffdfe132e2ad424eaa7605 (diff)
parente5710dee6f63d143e9c198b364a511b62fb5c421 (diff)
downloadmariadb-git-d7777d14c6d11024fe7dc2cf2930523ccd7765bd.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into polly.local:/home/kaa/src/maint/mysql-5.0-maint
Diffstat (limited to 'include')
-rw-r--r--include/my_pthread.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index ebba0ab32e1..631ca1d7c03 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -94,17 +94,19 @@ typedef void * (__cdecl *pthread_handler)(void *);
__int64 i64;
};
struct timespec {
- union ft64 start;
+ union ft64 tv;
/* The max timeout value in millisecond for pthread_cond_timedwait */
- long timeout_msec;
+ long max_timeout_msec;
};
#define set_timespec(ABSTIME,SEC) { \
- GetSystemTimeAsFileTime(&((ABSTIME).start.ft)); \
- (ABSTIME).timeout_msec= (long)((SEC)*1000); \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(SEC)*10000000; \
+ (ABSTIME).max_timeout_msec= (long)((SEC)*1000); \
}
#define set_timespec_nsec(ABSTIME,NSEC) { \
- GetSystemTimeAsFileTime(&((ABSTIME).start.ft)); \
- (ABSTIME).timeout_msec= (long)((NSEC)/1000000); \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \
+ (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
}
void win_pthread_init(void);