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 | a426f50f5c77086f50d1853f48159c391bcd633f (patch) | |
tree | 88f8eb36158b237cddb8fd5b1c7ee5283f8124f6 /include/my_pthread.h | |
parent | 131d1e6fdd88090dde6144be3c3d5150449efb95 (diff) | |
parent | 560e76c567c3551f5a4320acfc954200e8330ad8 (diff) | |
download | mariadb-git-a426f50f5c77086f50d1853f48159c391bcd633f.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; |