1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

my_pthread.h:

Let pthread_mutex_init() macro return 0 on Windows
mysql_priv.h:
  Return type is to be 'my_bool' for 'opt_enable_shared_memory'
This commit is contained in:
kent@mysql.com
2005-10-06 03:49:14 +02:00
parent 9077ee4407
commit 3af12c4776
2 changed files with 2 additions and 2 deletions

View File

@@ -144,7 +144,7 @@ extern int pthread_mutex_destroy (pthread_mutex_t *);
#define pthread_kill(A,B) raise(B)
#define pthread_exit(A) pthread_dummy()
#else
#define pthread_mutex_init(A,B) InitializeCriticalSection(A)
#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
#define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEOUT)
#define pthread_mutex_unlock(A) LeaveCriticalSection(A)