public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
From: "Alexander Terekhov" <TEREKHOV@de.ibm.com>
To: "Scott McCaskill" <scott@magruder.org>
Cc: pthreads-win32@sources.redhat.com
Subject: Re: destroying a locked mutex
Date: Tue, 24 Jul 2001 09:46:00 -0000	[thread overview]
Message-ID: <OFF00DDECB.F3CDA44F-ONC1256A93.005BC654@de.ibm.com> (raw)

> 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).



             reply	other threads:[~2001-07-24  9:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-24  9:46 Alexander Terekhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-25  3:32 Alexander Terekhov
2001-07-24 11:12 Bossom, John
2001-07-24 10:50 Alexander Terekhov
2001-07-24 10:04 Bossom, John
2001-07-24  9:11 Scott McCaskill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OFF00DDECB.F3CDA44F-ONC1256A93.005BC654@de.ibm.com \
    --to=terekhov@de.ibm.com \
    --cc=pthreads-win32@sources.redhat.com \
    --cc=scott@magruder.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).