"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: [PATCH] tog: fix usage of deprecated pthread_yield
To:
Quentin Rameau <quinq@fifth.space>, gameoftrees@openbsd.org
Date:
Tue, 21 Sep 2021 13:06:38 +0200

Download raw body.

Thread
On Sun, Sep 19, 2021 at 04:27:47PM +0200, Stefan Sperling wrote:
> On Sun, Sep 19, 2021 at 04:05:59PM +0200, Quentin Rameau wrote:
> > The pthread_yield isn't portable, let's use the POSIX equivalent
> > instead.
> > ---
> > Indeed, I had forgotten to add the correct header for sched_yield(),
> > that is fixed in this second revision of the patch.
> > ---
> >  tog/tog.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> This change is a no-op on OpenBSD since pthread_yield() is effectively
> an alias for sched_yield():
> 
> void
> pthread_yield(void)
> {
> 	sched_yield();
> }
> 
> 
> Given that, and given that this change helps -portable, I think we should
> apply your patch to got.git and let it flow to got-portable.git from there.
> Does anyone have concerns about using the sched_yield interface directly?

I have commmited this patch. Thank you, Quentin!