Le 2015-10-08 17:47, Hendrik Leppkes a écrit :
The real point of course is that pthread_once just cannot fail. The
spec doesn't define any error codes,

A reasonable implementation cannot fail. The specification certainly allows for it to fail. The only forbidden error code is EINTR, meaning a signal will not interrupt the call.

It would definitely make sense for a libc to return EINVAL if it detects that the once is not in either of the valid two states. A lame implementation could return ENOMEM.

I don't really care about pthread_once(). But I think libav should check mutex and CV operations. Namely, abort if init fails, and assert for all other functions for self debugging.

--
Rémi Denis-Courmont
http://www.remlab.net/
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to