This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] pthread_once: Use futex wrappers with error checking.


> -	      /* Same generation, some other thread was faster. Wait.  */
> -	      lll_futex_wait (once_control, newval, LLL_PRIVATE);
> +	      /* Same generation, some other thread was faster. Wait and
> +		 retry.  Ignore the return value because all possible
> +		 values (0, -EWOULDBLOCK, -EINTR) need to be handled the
> +		 same.  */

Two spaces between sentences, even when it was wrong before.
Always mention EAGAIN rather than EWOULDBLOCK.

Use ignore_value rather than only a comment, to be more explicit about a
correct case of ignoring errors.  Then we can use warn_unused_result on all
the new inlines, and turn up cases where failing to check for errors is
dubious (we have many today).

Aside from those nits, this change is fine and good once we've settled on
the new internal API details.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]