diff options
author | monty@donna.mysql.fi <> | 2001-03-24 20:15:14 +0200 |
---|---|---|
committer | monty@donna.mysql.fi <> | 2001-03-24 20:15:14 +0200 |
commit | aa115733800a27fb5ba1f9dd9a3f05b1ec8ec445 (patch) | |
tree | e705394f8291c4c2268717e3fb70734414d0f1d9 /include | |
parent | 2531f38803ff6804d6b195cb4f52cc55365435ed (diff) | |
download | mariadb-git-aa115733800a27fb5ba1f9dd9a3f05b1ec8ec445.tar.gz |
Added defines for fast mutex in glibc 2.2 (should be safe)
Fixed crash in SELECT DISTINCT SUM(...)
Fix return value of mysortncmp() for innobase
Fix join_crash bug
Diffstat (limited to 'include')
-rw-r--r-- | include/my_pthread.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 3d011f61ca2..652bdd205c0 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -499,11 +499,26 @@ extern int my_rw_unlock( my_rw_lock_t * ); #define pthread_attr_setstacksize(A,B) pthread_dummy(0) #endif +/* Define mutex types */ +#define MY_MUTEX_INIT_SLOW NULL +#define MY_MUTEX_INIT_FAST NULL +#define MY_MUTEX_INIT_ERRCHK NULL +#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP +extern pthread_mutexattr_t my_fast_mutexattr; +#undef MY_MUTEX_INIT_FAST +#define MY_MUTEX_INIT_FAST &my_fast_mutexattr +#endif +#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP +extern pthread_mutexattr_t my_errchk_mutexattr; +#undef MY_INIT_MUTEX_ERRCHK +#define MY_INIT_MUTEX_ERRCHK &my_errchk_mutexattr +#endif + extern my_bool my_thread_global_init(void); extern void my_thread_global_end(void); extern my_bool my_thread_init(void); extern void my_thread_end(void); -extern char *my_thread_name(void); +extern const char *my_thread_name(void); extern long my_thread_id(void); extern int pthread_no_free(void *); extern int pthread_dummy(int); |