diff options
author | Vladislav Vaintroub <wlad@sol> | 2009-12-04 20:05:04 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@sol> | 2009-12-04 20:05:04 +0000 |
commit | aea6035c731cda64fc90ac77a1f45597960cfaa0 (patch) | |
tree | 88f8eb36158b237cddb8fd5b1c7ee5283f8124f6 /include/my_pthread.h | |
parent | 82b605ea3782a2078d8bf28c7d65557722c11fa0 (diff) | |
parent | 34436edb4dd38f30d0f155e0a5fe484754ec5846 (diff) | |
download | mariadb-git-aea6035c731cda64fc90ac77a1f45597960cfaa0.tar.gz |
merge
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r-- | include/my_pthread.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index 5a73cf5bce8..6e3763b6181 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (C) 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc. 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 @@ -99,7 +99,7 @@ struct timespec { int win_pthread_mutex_trylock(pthread_mutex_t *mutex); -int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *); +int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *); int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr); int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, @@ -139,8 +139,8 @@ int pthread_cancel(pthread_t thread); #define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0) #define pthread_mutex_lock(A) (EnterCriticalSection(A),0) #define pthread_mutex_trylock(A) win_pthread_mutex_trylock((A)) -#define pthread_mutex_unlock(A) LeaveCriticalSection(A) -#define pthread_mutex_destroy(A) DeleteCriticalSection(A) +#define pthread_mutex_unlock(A) (LeaveCriticalSection(A), 0) +#define pthread_mutex_destroy(A) (DeleteCriticalSection(A), 0) #define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) @@ -631,6 +631,10 @@ extern int pthread_dummy(int); #endif #endif +#include <mysql/psi/mysql_thread.h> + +#define INSTRUMENT_ME 0 + struct st_my_thread_var { int thr_errno; |