* mutexes not unlocked when thread exits
@ 1994-08-24 9:47 Mr Mike James Lijewski
1994-08-28 16:06 ` Rich Salz
0 siblings, 1 reply; 2+ messages in thread
From: Mr Mike James Lijewski @ 1994-08-24 9:47 UTC (permalink / raw)
I've determined via experimantation that if a thread exits with a lock on
a mutex, that lock is not released; i.e. the mutex remains locked even
though the thread that most recently locked it no longer exists. This is under DEC OSF/1 V2.0 and V3.0. This runs counter to my intuition. Does the POSIX
Pthreads Draft have anything to say about this? Is there anyway out of this
dilemma?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mutexes not unlocked when thread exits
1994-08-24 9:47 mutexes not unlocked when thread exits Mr Mike James Lijewski
@ 1994-08-28 16:06 ` Rich Salz
0 siblings, 0 replies; 2+ messages in thread
From: Rich Salz @ 1994-08-28 16:06 UTC (permalink / raw)
In <33f4ul$sd@hk.super.net> lijewski@HK.Super.NET (Mr Mike James Lijewski) writes:
>if a thread exits with a lock on
>a mutex, that lock is not released;
Correct. That's the way it's supposed to work.
>Is there anyway out of this dilemma?
You should have pthread_cleanup_push() and pthread_cleanup_pop().
/r$
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1994-08-28 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-08-24 9:47 mutexes not unlocked when thread exits Mr Mike James Lijewski
1994-08-28 16:06 ` Rich Salz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox