diff options
author | Marc Alff <marc.alff@sun.com> | 2009-11-30 17:49:15 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2009-11-30 17:49:15 -0700 |
commit | fa3cfa07ddda7c1d17a2eacc8acfb1f87f625ff9 (patch) | |
tree | 60c7ded488b2fdc27e6b1d0de6f621cf4503e7dd /include/my_pthread.h | |
parent | 4b28a6ce84fbcab3e819018a03c116c0939dab5e (diff) | |
download | mariadb-git-fa3cfa07ddda7c1d17a2eacc8acfb1f87f625ff9.tar.gz |
WL#2360 Performance schema
Part 1: Instrumentation interface
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 3b95e2adb73..c4d4e3d7adf 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, @@ -137,8 +137,8 @@ int pthread_join(pthread_t thread, void **value_ptr); #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) @@ -630,6 +630,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; |