DragonFly kernel List (threaded) for 2003-12
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: LibC status and others...
-On [20031211 00:52], Matthew Dillon (dillon@xxxxxxxxxxxxxxxxxxxx) wrote:
> What I would do is rename, e.g., getpwnam() to getpwnam_r(), add the
> required passwd pointer, and use the pointer instead of the static
> _pw_passwd. Then write a new getpwnam() which simply aclls
> getpwnam_r() using &_pw_passwd for the passwd pointer.
Wish it were that easy.
You need to account for a multiple of things:
- thread-safety
- reentrancy
- (asynchronous) cancellation-safety
- asynchronous signal-safety
POSIX threads defines getpwnam_r() as a function which may be
implemented as a cancellation point.
--
Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / kita no mono
PGP fingerprint: 2D92 980E 45FE 2C28 9DB7 9D88 97E6 839B 2EAC 625B
http://www.tendra.org/ | http://diary.in-nomine.org/
To meet, to know, to love - and then to part, is the sad tale of many a
heart...
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]