review request: making openat(2) a cancellation point

Jilles Tjoelker jilles at stack.nl
Mon Oct 5 17:17:31 UTC 2009


While implementing a faster, cleaner and more compliant getcwd(3) using
*at functions, I noticed that openat() was not a cancellation point
(unlike open()). I think that should be fixed first, both for its own
sake and because getcwd() will need to use _openat.

I created the attached patch. It seems to work, I can still compile and
run non-threaded and threaded programs using openat() and I can cancel a
thread blocked in openat() (such as trying to open a fifo). I can also
use _openat in libc. However, I think some review is appropriate because
it all looks fairly complicated.

Because libkse and libc_r don't seem to be built, I have not updated
them.

Note that this will cause threaded 9.x binaries that use openat() to
break on 8.x. This is to be expected.

-- 
Jilles Tjoelker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openat-cancel.patch
Type: text/x-diff
Size: 3262 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-threads/attachments/20091005/7f6eed23/openat-cancel.bin


More information about the freebsd-threads mailing list