mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Alex Xu (Hello71)" <>
Subject: Re: [musl] pthread_cond_wait may has a error
Date: Thu, 10 Aug 2023 10:06:17 -0400	[thread overview]
Message-ID: <1691676230.gfmh0cw839.none@localhost> (raw)
In-Reply-To: <>

Excerpts from 祁金全's message of August 10, 2023 2:22 am:
> Hi,
> In my demo, I create 3 threads, the first and the second thread are wait for the global pthread_cond with different pthread_mutex
> The effect of using more than one mutex for concurrent 
> pthread_cond_wait() or pthread_cond_timedwait() operations on the same 
> condition variable is undefined
> When a thread waits on a condition variable, having specified a 
> particular mutex to either the pthread_cond_timedwait() or the 
> pthread_cond_wait() operation, a dynamic binding is formed between 
> that mutex and condition variable that remains in effect as long as at 
> least one thread is blocked on the condition variable. During this 
> time, the effect of an attempt by any thread to wait on that condition 
> variable using a different mutex is undefined.


  reply	other threads:[~2023-08-10 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10  6:22 祁金全
2023-08-10 14:06 ` Alex Xu (Hello71) [this message]
2023-08-10 21:52 ` Patrick Oppenlander

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:

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

  git send-email \
    --in-reply-to=1691676230.gfmh0cw839.none@localhost \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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 NNTP newsgroup(s).