mariadb/windows/tests/test-pthread-rwlock-rdlock.c
Yoni Fogel daa05c3f29 Closes #1790 Merge from 2.0.1 into main. Also add tests to freebsd.
svn merge --accept=postpone -r 12459:12461 ../../mysql.branches/2.0.1/tokudb/

git-svn-id: file:///svn/toku/tokudb@12462 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:53 -04:00

20 lines
588 B
C

#include <toku_assert.h>
#include <test.h>
#include <toku_pthread.h>
#include <stdio.h>
#include <unistd.h>
int test_main(int argc, char *argv[]) {
int r;
toku_pthread_rwlock_t rwlock;
r = toku_pthread_rwlock_init(&rwlock, NULL); assert(r == 0);
r = toku_pthread_rwlock_rdlock(&rwlock); assert(r == 0);
r = toku_pthread_rwlock_rdlock(&rwlock); assert(r == 0);
r = toku_pthread_rwlock_rdunlock(&rwlock); assert(r == 0);
r = toku_pthread_rwlock_rdunlock(&rwlock); assert(r == 0);
r = toku_pthread_rwlock_destroy(&rwlock); assert(r == 0);
return 0;
}