Saving locks after we set it to 0 was kind of pointless.
Artur Bergman [Sat, 27 Apr 2002 11:46:53 +0000 (11:46 +0000)]
Hunting down fixes in cond_* functions.

p4raw-id: //depot/perl@16208

ext/threads/shared/shared.xs

index 2680bbf..3d339e4 100644 (file)
@@ -980,7 +980,8 @@ cond_wait_enabled(SV *ref)
        /* Stealing the members of the lock object worries me - NI-S */
        MUTEX_LOCK(&shared->lock.mutex);
        shared->lock.owner = NULL;
-       locks = shared->lock.locks = 0;
+       locks = shared->lock.locks;
+       shared->lock.locks = 0;
        COND_WAIT(&shared->user_cond, &shared->lock.mutex);
        shared->lock.owner = aTHX;
        shared->lock.locks = locks;