If you’re not running a threaded program, my function wouldn’t be “less
safe.”

I’d imagine that 99% of programs aren’t multithreaded.

On Mon, May 16, 2022 at 1:01 PM <k...@sdf.org> wrote:

> > There is the specifically non-threadsafe call getchar_unlocked() on
> OpenBSD
> > which is presumably available for performance reasons alone, when
> getchar()
> > is a perfectly viable option and is even an ISO conforming function.
> What I
> > submitted could be such a higher performance non-threadsafe function.
> >
> > so, how about arc4random_uniform_unlocked() ?!
>
> getchar_unlocked is mandated by POSIX.
>
> OpenBSD has not yet invented an alternate function that only exists to
> give away safety for performance. It has only gone in the opposite
> direction if anything.
>
> --
-Luke

Reply via email to