tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] Re: sharing mutex between libc stub and libpthread
David Laight <david%l8s.co.uk@localhost> wrote:
> > We could warnx() and return an error, but that would be a standard
> > violation: only EAGAIN, EPERM and EINVAL are allowed.
>
> A library function can't write to stdout or stderr either, nor even
> assume that fd 0, 1 and 2 have anything like their expected uses.
I changed it to this:
if (__predict_false(!__isthreaded)) {
pthread__errorfunc(__FILE__, __LINE__, __func__,
"pthread_create() requires linking with -lpthread");
return __libc_thr_create_stub(thread, attr, startfunc, arg);
}
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index