diff options
author | Sergei Golubchik <serg@mysql.com> | 2008-08-31 17:20:20 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mysql.com> | 2008-08-31 17:20:20 +0200 |
commit | b54ac0728dcef412ad48c092139c150cac31550c (patch) | |
tree | 5533bb81e5af60709aff0a71dcd20aa353458569 /mysys/waiting_threads.c | |
parent | 8ccb262d055212a0a962652466a6d05275effb50 (diff) | |
download | mariadb-git-b54ac0728dcef412ad48c092139c150cac31550c.tar.gz |
fixes for windows
Diffstat (limited to 'mysys/waiting_threads.c')
-rw-r--r-- | mysys/waiting_threads.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c index 78cea6c9673..49b41111311 100644 --- a/mysys/waiting_threads.c +++ b/mysys/waiting_threads.c @@ -170,19 +170,19 @@ static my_atomic_rwlock_t cycle_stats_lock, wait_stats_lock, success_stats_lock; do { \ WT_RESOURCE *R=(X); \ DBUG_PRINT("wt", ("LOCK resid=%lld for READ", R->id.value.num)); \ - pthread_rwlock_rdlock(&R->lock); \ + rw_rdlock(&R->lock); \ } while (0) #define rc_wrlock(X) \ do { \ WT_RESOURCE *R=(X); \ DBUG_PRINT("wt", ("LOCK resid=%lld for WRITE", R->id.value.num)); \ - pthread_rwlock_wrlock(&R->lock); \ + rw_wrlock(&R->lock); \ } while (0) #define rc_unlock(X) \ do { \ WT_RESOURCE *R=(X); \ DBUG_PRINT("wt", ("UNLOCK resid=%lld", R->id.value.num)); \ - pthread_rwlock_unlock(&R->lock); \ + rw_unlock(&R->lock); \ } while (0) /* @@ -203,7 +203,7 @@ static void wt_resource_init(uchar *arg) DBUG_ENTER("wt_resource_init"); bzero(rc, sizeof(*rc)); - pthread_rwlock_init(&rc->lock, 0); + my_rwlock_init(&rc->lock, 0); pthread_cond_init(&rc->cond, 0); my_init_dynamic_array(&rc->owners, sizeof(WT_THD *), 0, 5); DBUG_VOID_RETURN; @@ -221,7 +221,7 @@ static void wt_resource_destroy(uchar *arg) DBUG_ENTER("wt_resource_destroy"); DBUG_ASSERT(rc->owners.elements == 0); - pthread_rwlock_destroy(&rc->lock); + rwlock_destroy(&rc->lock); pthread_cond_destroy(&rc->cond); delete_dynamic(&rc->owners); DBUG_VOID_RETURN; |