git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "AZero13 via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,  AZero13 <gfunni234@gmail.com>
Subject: Re: [PATCH v2] win32: pthread_cond_wait should return a value
Date: Tue, 18 Nov 2025 10:17:27 -0800	[thread overview]
Message-ID: <xmqqms4jdx3c.fsf@gitster.g> (raw)
In-Reply-To: <pull.2103.v2.git.git.1763480546981.gitgitgadget@gmail.com> (AZero's message of "Tue, 18 Nov 2025 15:42:26 +0000")

"AZero13 via GitGitGadget" <gitgitgadget@gmail.com> writes:

> Subject: Re: [PATCH v2] win32: pthread_cond_wait should return a value

Is this mistitled?  The patch text talks about cond_init(), not cond_wait(),
which is the theme for the other patch around SleepConditionVariableCS().

> From: Greg Funni <gfunni234@gmail.com>
>
> This value is not checked, but it must return to match POSIX
>
> Signed-off-by: Greg Funni <gfunni234@gmail.com>
> ---
> ...
> diff --git a/compat/win32/pthread.h b/compat/win32/pthread.h
> index e2b5c4f64c..000604cdf6 100644
> --- a/compat/win32/pthread.h
> +++ b/compat/win32/pthread.h
> @@ -34,7 +34,7 @@ typedef int pthread_mutexattr_t;
>  
>  #define pthread_cond_t CONDITION_VARIABLE
>  
> -#define pthread_cond_init(a,b) InitializeConditionVariable((a))
> +#define pthread_cond_init(a,b) return_0((InitializeConditionVariable((a)), 0))
>  #define pthread_cond_destroy(a) do {} while (0)
>  #define pthread_cond_wait(a,b) return_0(SleepConditionVariableCS((a), (b), INFINITE))
>  #define pthread_cond_signal WakeConditionVariable
>
> base-commit: 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed

  reply	other threads:[~2025-11-18 18:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18  0:59 [PATCH] win32: pthread_cond_wait should return a value AZero13 via GitGitGadget
2025-11-18 15:42 ` [PATCH v2] " AZero13 via GitGitGadget
2025-11-18 18:17   ` Junio C Hamano [this message]
2025-11-20 21:43   ` [PATCH v3] win32: pthread_cond_init " AZero13 via GitGitGadget
2025-11-21  1:46     ` Junio C Hamano
2025-12-07  0:18       ` Junio C Hamano

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=xmqqms4jdx3c.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=gfunni234@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    /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 NNTP newsgroup(s).