diff options
author | unknown <ingo@mysql.com> | 2006-03-10 22:28:50 +0100 |
---|---|---|
committer | unknown <ingo@mysql.com> | 2006-03-10 22:28:50 +0100 |
commit | 34e43cd3a9ecbe38cb35a7e2f6638ee5e046f9ef (patch) | |
tree | 2b24a8d457693e2890afcbf41a1b7f673d3e9c10 /include | |
parent | cefb1dc2743ee50c83f075897a9e0b3c4f303b68 (diff) | |
parent | 2722db6dd45f3084f8f5dd5966474274dba798f3 (diff) | |
download | mariadb-git-34e43cd3a9ecbe38cb35a7e2f6638ee5e046f9ef.tar.gz |
Merge mysql.com:/home/mydev/mysql-5.0
into mysql.com:/home/mydev/mysql-5.0-bug14980
Diffstat (limited to 'include')
-rw-r--r-- | include/my_no_pthread.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/include/my_no_pthread.h b/include/my_no_pthread.h index 2c9cde65e78..5691de08783 100644 --- a/include/my_no_pthread.h +++ b/include/my_no_pthread.h @@ -14,15 +14,34 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#if !defined(_my_no_pthread_h) && !defined(THREAD) +#define _my_no_pthread_h + + +/* + This block is to access some thread-related type definitions + even in builds which do not need thread functions, + as some variables (based on these types) are declared + even in non-threaded builds. + Case in point: 'mf_keycache.c' +*/ +#if defined(__WIN__) || defined(OS2) + +#elif defined(HAVE_UNIXWARE7_THREADS) +/* #include <thread.h> Currently, not relevant. Enable if needed. */ + +#else /* Normal threads */ +#include <pthread.h> + +#endif /* defined(__WIN__) */ + + /* This undefs some pthread mutex locks when one isn't using threads to make thread safe code, that should also work in single thread environment, easier to use. */ - -#if !defined(_my_no_pthread_h) && !defined(THREAD) -#define _my_no_pthread_h - #define pthread_mutex_init(A,B) #define pthread_mutex_lock(A) #define pthread_mutex_unlock(A) @@ -32,4 +51,5 @@ #define rw_wrlock(A) #define rw_unlock(A) #define rwlock_destroy(A) + #endif |