summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuites/psxtests/psxcleanup/psxcleanup.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/testsuites/psxtests/psxcleanup/psxcleanup.c b/testsuites/psxtests/psxcleanup/psxcleanup.c
index ba13a40ca5..568e897a76 100644
--- a/testsuites/psxtests/psxcleanup/psxcleanup.c
+++ b/testsuites/psxtests/psxcleanup/psxcleanup.c
@@ -209,13 +209,12 @@ void *WriterThread(void *arg)
puts("cleanup push for write");
pthread_cleanup_push(release_write_lock, &l->lock);
+ /* Thread has write lock. */
+ release_write_lock(&l->lock);
+
/* do nothing */
puts("do nothing cleanup pop for write");
pthread_cleanup_pop(0);
-
- /* Thread has write lock. */
- puts("cleanup pop for write");
- pthread_cleanup_pop(1);
return NULL;
}