summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/mutex7e.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index e9266a5..b3916d2 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,7 @@
+2002-12-11 Ross Johnson <ross@special.ise.canberra.edu.au>
+
+ * mutex7e.c: Assert EBUSY return instead of EDEADLK.
+
2002-06-03 Ross Johnson <rpj@digit.ise.canberra.edu.au>
* semaphore2.c: New test.
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);