3 ms·
> Lots of APIs allow reporting of I/O errors without use of an errno-like construct. libc included--the C11 threads API returns some errors directly using the
by wahern 4y ago
> Lots of APIs allow reporting of I/O errors without use of an errno-like construct.
libc included--the C11 threads API returns some errors directly using the constants thrd_busy, thrd_nomem, and thrd_timedout. Unfortunately, it also uses a catch-all constant, thrd_error, for other errors.
The pthreads API returns errno values directly as return values, but that's POSIX, not C.