summaryrefslogtreecommitdiff
path: root/tests/mutex7e.c
diff options
context:
space:
mode:
authorrpj <rpj>2002-12-11 00:40:17 +0000
committerrpj <rpj>2002-12-11 00:40:17 +0000
commit52c1047709bbc61fa793bcc6a28daabea88d2a20 (patch)
tree99cd6abc47bfcd0e2db847c447ff834f08d87907 /tests/mutex7e.c
parentb5e1f8e4dcad0b58d7d2e27d7485fe5162154281 (diff)
2002-12-11 Thomas Pfaff <tpfaff@gmx.net>
* pthread_mutex_trylock.c: Should return EBUSY rather than EDEADLK. * pthread_mutex_destroy.c: Remove redundant ownership test (the trylock call does this for us); do not destroy a recursively locked mutex.
Diffstat (limited to 'tests/mutex7e.c')
-rw-r--r--tests/mutex7e.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/mutex7e.c b/tests/mutex7e.c
index 5b8e68f..8d3a2d3 100644
--- a/tests/mutex7e.c
+++ b/tests/mutex7e.c
@@ -37,7 +37,7 @@
*
* Tests PTHREAD_MUTEX_ERRORCHECK mutex type.
* Thread locks and then trylocks mutex (attempted recursive lock).
- * Trylock should fail with an EDEADLK error.
+ * Trylock should fail with an EBUSY error.
* The second unlock attempt should fail with an EPERM error.
*
* Depends on API functions:
@@ -64,7 +64,7 @@ void * locker(void * arg)
{
assert(pthread_mutex_lock(&mutex) == 0);
lockCount++;
- assert(pthread_mutex_trylock(&mutex) == EDEADLK);
+ assert(pthread_mutex_trylock(&mutex) == EBUSY);
lockCount++;
assert(pthread_mutex_unlock(&mutex) == 0);
assert(pthread_mutex_unlock(&mutex) == EPERM);