This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: destroying a locked mutex



> Should pthread_mutex_destroy() return an error if the mutex is locked?

POSIX standard says: "Attempting to destroy a locked mutex
results in undefined behavior."

in general, you should not destroy any object unless you
are absolutely sure that no one else is using it and/or
no reachable refs/ptrs to it is left somewhere around.

regards,
alexander.


"Scott McCaskill" <scott@magruder.org> on 07/24/2001 06:15:18 PM

Please respond to "Scott McCaskill" <scott@magruder.org>

To:   pthreads-win32@sources.redhat.com
cc:
Subject:  destroying a locked mutex




Should pthread_mutex_destroy() return an error if the mutex is locked?
pthreads-win32 seems to disagree with the linux implementation of pthreads
on this point (OK on windows, not on linux).




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]