Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2018 22:05:04 -0800
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Andrew Kelley <andrew@ziglang.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: raise() implementation in freebsd libc vs musl libc
Message-ID:  <20181213060504.GA43628@troutmask.apl.washington.edu>
In-Reply-To: <70c7214e-3619-115d-abca-09853a1729a6@ziglang.org>
References:  <70c7214e-3619-115d-abca-09853a1729a6@ziglang.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Dec 13, 2018 at 12:11:21AM -0500, Andrew Kelley wrote:
> 
> I noticed that musl-libc blocks signals in raise() to prevent a race
> condition, but freebsd libc does not. is there a reason it's necessary
> on linux and not freebsd?
> 
> 	if (__sys_thr_self(&id) == -1)
> 		return (-1);
> 	return (__sys_thr_kill(id, s));

The answer probably lies in the meaining of '_thr_' in the
above function names.  See src/sys/kern/kern_thr.c.

-- 
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181213060504.GA43628>