Commit Graph

44 Commits

Author SHA1 Message Date
christos a34711bbb2 Add missing headers 2024-01-19 19:55:03 +00:00
christos d11110f473 Add epoll(2) from Theodore Preduta as part of GSoC 2023 2023-07-28 18:18:59 +00:00
rillig 388550b026 lib: remove CONSTCOND comment
Since 2021-01-31, lint doesn't need it anymore for the common pattern of
'do ... while (0)'.
2022-04-19 20:32:14 +00:00
riastradh 568eb77ef2 pthread: Nix trailing whitespace. 2022-04-10 10:38:33 +00:00
riastradh 7adb41074d libpthread: Move namespacing include to top of .c files.
Stuff like libc's namespace.h, or atomic_op_namespace.h, which does
namespacing tricks like `#define atomic_cas_uint _atomic_cas_uint',
has to go at the top of each .c file.  If it goes in the middle, it
might be too late to affect the declarations, and result in compile
errors.

I tripped over this by including <sys/atomic.h> in mips
<machine/lock.h>.

(Maybe we should create a new pthread_namespace.h file for the
purpose, but this'll do for now.)
2022-02-12 14:59:32 +00:00
christos a8d8435dfa remove parameter names from decls. 2021-10-01 20:13:38 +00:00
christos 0d258229ce PR/56424: Clay Mayers: recvfrom() is not a cancelation point as documented
in pthread_setcanceltype.3
2021-10-01 17:13:44 +00:00
christos 71d484f921 - Allow libpthread to be dlopened again, by providing libc stubs to libpthread.
- Fail if the dlopened libpthread does pthread_create(). From manu@
- Discussed at length in the mailing lists; approved by core@
- This was chosen as the least intrusive patch that will provide
  the necessary functionality.
XXX: pullup to 6
2013-03-21 16:49:11 +00:00
christos 5662c2716e trailing whitespace police. 2012-04-04 17:47:03 +00:00
agc 76f4f39125 Add a pthread cancel stub for sigwait, following Onno van der Linden's
analysis in PR 45131.  Kindly tested by Hisashi T Fujinaka (using csup
as the test case) with a successful outcome.

OK martin@
2012-04-04 06:29:16 +00:00
joerg 5c2887509e Don't kill the read(2) stub, just the magic around it. 2011-04-22 14:18:34 +00:00
joerg 77abb554dc Disable Fortification for pthread and rump stubs. 2011-04-21 13:38:14 +00:00
martin a128c5080b Backout previous, it causes lots of test failures (tests/fs/nfs for
example).
2011-04-21 08:17:00 +00:00
christos e6eca274ad Fix SSP builds (Vladimir Kirillov) 2011-04-12 19:49:48 +00:00
christos 4ffe9a1805 make the code more re-usable 2011-01-26 18:48:57 +00:00
christos 74a83d351e Moving the ssp check inside the source code does not work properly because
the compiler loses information about the size of the object. So instead of
the hacky #define mess we did before, add a way to inject our function between
the user call and the system call.
2011-01-26 18:11:35 +00:00
christos 13fe5bd280 Fix SSP build.
XXX: This is gross.
2011-01-25 19:13:26 +00:00
christos f6cf46930e make kevent(2) a cancelation point, and document properly all the cancelation
points we currently support.
2010-08-06 05:25:46 +00:00
enami cc63c84008 Make nanosleep cancelable again. 2009-08-12 23:51:23 +00:00
christos 6343ca254d fix __sigtimedwait50 2009-01-13 01:50:04 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
christos 62f7265ebd revert previous. It was meant for the branch 2008-12-29 15:08:03 +00:00
christos 6c20e81ce2 adjust for time_t 64 2008-12-28 21:33:35 +00:00
ad fdc51b51d9 Adjust the compat stuff slightly so that the changes are mostly self
contained (Makefile, pthread_compat.c).
2008-10-08 08:27:07 +00:00
ad 844fcfc979 make PTHREAD__COMPAT=1
Builds a libpthread that can be dropped into a NetBSD 2/3/4 chroot.

This makes threading work in the chroot when using a NetBSD 5 kernel, no
other modifications required.
2008-09-29 08:48:15 +00:00
ad b4c1afd422 Shut lint up. 2008-06-28 16:50:43 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
christos a0e4739ced PR/37932: Yakovetsky Vladimir: build distribution with USE_FORT fails
Avoid read redefinition
2008-02-02 17:09:29 +00:00
ad 622bbc505a - Use pthread__cancelled() in more places.
- pthread_join(): assert that pthread_cond_wait() returns zero.
2007-12-24 16:04:20 +00:00
ad a448c4f214 int -> ssize_t in a couple of places. 2007-11-19 15:12:18 +00:00
rmind 25e540085b Add cancellation stubs in libpthread for POSIX messages queues and
asynchronous I/O.

OK by <ad>.
2007-10-09 18:18:33 +00:00
ad 1f1ddafc0c Add __sigsuspend14, sigtimedwait as cancellation points. 2007-03-04 20:07:13 +00:00
christos f1cc481dfe XXX: Work around libpthread's "intimate" connection with libc. 2005-09-13 02:45:38 +00:00
kleink 34579587e1 Include <sys/select.h> explicitly rather than relying on other headers
to do it.
2005-03-21 09:00:49 +00:00
kleink 363c26d4ba Interpose cancellation points in pollts() and pselect(), bringing us
to libc.so.12.127 and libpthread.so.0.6.
2005-03-18 11:23:44 +00:00
kleink ebf592f1e6 Move up the definition of __LIBC12_SOURCE__; since <poll.h> now includes
<sys/sigtypes.h> this is needed earlier.
2005-03-10 00:34:23 +00:00
kleink 6b3fbf5d75 IEEE Std 1003.1-2001/Cor 2-2004, item XSH/TC2/D6/5: fdatasync() shall
have cancellation points.

Note: we ride today's resolver-related version bumps.
2004-05-21 17:15:42 +00:00
cl 4f8ea51319 add CONSTCOND in constant condition. 2003-11-24 23:23:17 +00:00
nathanw cdf7f99ee6 Manually inline pthread__testcancel in these routines; two function
calls' worth of overhead per cancellable syscall is overkill.
2003-11-21 23:03:13 +00:00
thorpej 137c808bb8 Userland portion of fsync_range(2), written by Bill Studenmund, and
contributed by Wasabi Systems, Inc.
2003-11-18 00:56:56 +00:00
lukem f043c0fb57 add __RCSID() 2003-03-08 08:03:34 +00:00
nathanw 6aab0806c8 Implement nanosleep() at userlevel. Threaded applications seem to like
to sleep a lot, and there's no need for each such thread to consume kernel
resources.

(accidentally checked the pthread.c part of this in yesterday; no reason
 not to finish the job)
2003-02-15 22:15:50 +00:00
nathanw 05a755440a Add cancellation stubs for accept() and connect(). 2003-01-27 20:57:41 +00:00
thorpej c62a74e6d5 Merge the nathanw_sa branch. 2003-01-18 10:32:11 +00:00