diff options
author | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-03-09 15:47:59 +0200 |
commit | 139a2b64bf8ec2e248656835e23a5c98ffc667a8 (patch) | |
tree | 7d77d6f1073f8090f275b30cb3f10254497da243 /include/my_pthread.h | |
parent | b3f7eac5301529c2d069ebe4d0558980412af3a2 (diff) | |
parent | ce675406ca8dbc1532a908803a1371de8432d466 (diff) | |
download | mariadb-git-139a2b64bf8ec2e248656835e23a5c98ffc667a8.tar.gz |
Merge with 5.2
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 5cf6c5d5fac..fffb883912a 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. +/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc, + 2010-2011 Oracle and/or its affiliates, 2009-2010 Monty Program Ab. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -125,11 +126,10 @@ 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); - void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ #ifndef ETIMEDOUT -#define ETIMEDOUT 145 /* Win32 doesn't have this */ +#define ETIMEDOUT 145 /* Win32 might not have this */ #endif #define getpid() GetCurrentThreadId() #define HAVE_LOCALTIME_R 1 @@ -224,7 +224,11 @@ extern int my_pthread_getprio(pthread_t thread_id); typedef void *(* pthread_handler)(void *); #define my_pthread_once_t pthread_once_t +#if defined(PTHREAD_ONCE_INITIALIZER) +#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER +#else #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT +#endif #define my_pthread_once(C,F) pthread_once(C,F) /* Test first for RTS or FSU threads */ |