summaryrefslogtreecommitdiff
path: root/include/my_pthread.h
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2009-12-19 14:11:48 +0100
committerVladislav Vaintroub <vvaintroub@mysql.com>2009-12-19 14:11:48 +0100
commitcd94452eda6491d72e34983f0cba26ca6344e34b (patch)
treed5461ec6ad35812385dd5cfef327052838c471b4 /include/my_pthread.h
parentdd88cefe0b0528e641540bdbfc06113ac79bdcde (diff)
parentfaed50d5552f6d78f4c32274b346516f4267304b (diff)
downloadmariadb-git-cd94452eda6491d72e34983f0cba26ca6344e34b.tar.gz
merge
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r--include/my_pthread.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 51dd9c72c79..aa667e9ce72 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -67,6 +67,11 @@ typedef int pthread_mutexattr_t;
#define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *);
+typedef volatile LONG my_pthread_once_t;
+#define MY_PTHREAD_ONCE_INIT 0
+#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
@@ -110,6 +115,7 @@ int pthread_cond_destroy(pthread_cond_t *cond);
int pthread_attr_init(pthread_attr_t *connect_att);
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
int pthread_attr_destroy(pthread_attr_t *connect_att);
+int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void));
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
@@ -187,6 +193,10 @@ void my_pthread_exit(void *status);
#define pthread_handler_t EXTERNC void *
typedef void *(* pthread_handler)(void *);
+#define my_pthread_once_t pthread_once_t
+#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define my_pthread_once(C,F) pthread_once(C,F)
+
/* Test first for RTS or FSU threads */
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)