diff options
author | rpj <rpj> | 2004-10-01 07:17:09 +0000 |
---|---|---|
committer | rpj <rpj> | 2004-10-01 07:17:09 +0000 |
commit | b0cf9efa6afeb8a7dbddf124dae173a2d633c801 (patch) | |
tree | 8f208f15bd63cf69ae9e2ceb2d523296db8bca76 /tests/mutex4.c | |
parent | 531ca4db4794aab863a898b4d079ccd59b424b25 (diff) |
Mutex speedups
Diffstat (limited to 'tests/mutex4.c')
-rw-r--r-- | tests/mutex4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/mutex4.c b/tests/mutex4.c index 74ec159..75880fd 100644 --- a/tests/mutex4.c +++ b/tests/mutex4.c @@ -69,6 +69,9 @@ main() assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_DEFAULT) == 0); assert(pthread_mutex_init(&mutex1, &ma) == 0); assert(pthread_mutex_lock(&mutex1) == 0); + /* + * NORMAL (fast) mutexes don't check ownership. + */ assert(pthread_create(&t, NULL, unlocker, (void *) 0) == 0); assert(pthread_join(t, NULL) == 0); assert(pthread_mutex_unlock(&mutex1) == EPERM); @@ -78,6 +81,9 @@ main() assert(pthread_mutexattr_settype(&ma, PTHREAD_MUTEX_NORMAL) == 0); assert(pthread_mutex_init(&mutex1, &ma) == 0); assert(pthread_mutex_lock(&mutex1) == 0); + /* + * NORMAL (fast) mutexes don't check ownership. + */ assert(pthread_create(&t, NULL, unlocker, (void *) 0) == 0); assert(pthread_join(t, NULL) == 0); assert(pthread_mutex_unlock(&mutex1) == EPERM); |