649 Commits

Author SHA1 Message Date
explorer
fc70b598c4 fix the pthread pt_lid in the fork callback function that runs in the child instead of a function that may be going away. KNFify 2010-03-25 01:15:00 +00:00
explorer
3f82e012db Correctly set pt_lid in the child, after a fork 2010-03-24 07:27:22 +00:00
drochner
1982972a07 catch up with the __RENAME of nanosleep(2) a while ago, otherwise we
get the compatibility function which assumes a different struct timespec
2010-03-23 20:35:44 +00:00
joerg
f70c7c0422 Use .In instead of .Ar Pa 2010-03-22 21:56:05 +00:00
rmind
63a834705c pthread_attr(3): sync with reality i.e. uncomment descriptions about
various functions we support.  Fix license style.
2009-10-05 23:37:01 +00:00
rmind
26ce5a50b4 pthread(3): mention that we use 1:1 threading model; remove descriptions
of no longer used environment variables.
2009-10-05 23:35:42 +00:00
rmind
81bc3e51a5 Add check to avoid multiple inclusions and redefinitions.
KNF while here.
2009-10-05 23:33:48 +00:00
christos
85ddadbfdc Don't just look only at the first element in the deadqueue to find lwp's
to reuse, because if we lose the race with the kernel we are never going
to reuse any elements. Look in the whole list instead.
XXX: should be pulled up to 5.x
2009-10-03 23:49:50 +00:00
enami
cc63c84008 Make nanosleep cancelable again. 2009-08-12 23:51:23 +00:00
rumble
b222d9680b "unblocks the mutex" -> "unlocks the mutex" 2009-07-02 19:43:06 +00:00
joerg
cdb510a7bb Restore use of _lwp_makecontext, the AMD64 bug has been fixed. 2009-07-02 09:59:00 +00:00
joerg
35173b1fce Partially revert 1.110: Use makecontext again until the problems with
_lwp_makecontext are solved.
2009-06-25 13:38:43 +00:00
njoly
49931fb2d8 Restore PTHREAD__ASM_RASOPS for alpha (from _context_u.S), that was
lost in previous cleanup.

ok by ad@.
2009-05-18 13:03:35 +00:00
ad
61cac435e4 - Convert from makecontext() -> _lwp_makecontext().
- Rely on _lwp_makecontext() to set up the thread identity register.
  This is not currently done (a bug), nor does libpthread use the
  threadreg yet. I'm doing this so it the code can be used by the
  person working on TLS to verify that their threadreg code is working.
2009-05-17 14:49:00 +00:00
ad
a61915e94f Remove unused code that's confusing when using cscope/opengrok. 2009-05-16 22:20:40 +00:00
wiz
8b5179c21c Add CAVEATS section:
Due to limitations in the current pthread implementation, makecontext(3)
and sigaltstack(2) should not be used in programs which link against
libpthread (whether threads are used or not).

Wording from drochner@ and ad@

Bump date for man pages.

Add note in libpthread/README so it's not forgotten to update the man
pages when the problem is fixed.
2009-04-16 18:37:29 +00:00
wiz
7d9f3abb75 Avoid duplicate .Pp. 2009-04-11 16:51:39 +00:00
wiz
c32974546d Remove trailing whitespace. 2009-04-11 16:51:28 +00:00
joerg
d3c6cf0458 .\" are comments, not ./" 2009-04-11 15:35:15 +00:00
drochner
f1c955a1b2 Fix the comparision function used by the red-black tree global thread list
implementation:
-don't return a difference, this can overflow
-don't try to substract typed pointers which don't belong to the
 same object, this gives undefined results

This fixes instabilities of programs which use more than a handful
of threads, eg spuriously failing pthread_join().
2009-04-01 10:13:24 +00:00
ad
7de9da978b Revert the _lwp_ctl which is causing problem. I did test this locally,
I guess not well enough.
2009-03-30 21:32:51 +00:00
ad
5c670ea686 - Make the threadreg code use _lwp_setprivate() instead of MD hooks.
XXX This must not be enabled by default because the LWP private mechanism
  is reserved for TLS. It is provided only as a test/demo.

  XXX Since ucontext_t does not contain the thread private variable, for a
  short time after threads are created their thread specific data is unset.
  If a signal arrives during that time we are screwed.

- No longer need pthread__osrev.

- Rearrange _lwp_ctl() calls slightly.
2009-03-29 09:30:05 +00:00
ad
a46df1f1f2 pthread_barrier: Fix numerous stupid bugs. Surprising that nobody
complained yet.
2009-01-29 21:19:35 +00:00
wiz
0aec71a9f5 Fix typo. 2009-01-24 13:00:03 +00:00
rmind
909e7f4259 - Make thread-affinity and processor-set interfaces mutually exlusive.
- pset_assign: when CPU is assigned, migrate out all LWPs from it.
2009-01-20 01:57:35 +00:00
lukem
a06595c27b fix -Wsign-compare issues 2009-01-18 12:14:16 +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
wiz
42fdda0454 Bump date for previous. 2008-12-31 14:19:51 +00:00
christos
4a65af23ac mention that these may fail with EPERM. From Anon Ymous 2008-12-31 13:57:54 +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
ebaaa8cf7a Some things to do on major bump. 2008-12-28 11:01:58 +00:00
ad
18e73e1ebe Replace semid_t with intptr_t. No function change. This is a libc/kernel
private interface and so the name change should not affect any third
party code.
2008-11-14 15:49:20 +00:00
uwe
55247fa322 Fix typo in comment. 2008-10-27 00:52:07 +00:00
uwe
47cd7b4502 Pull down revision 1.3.6.1 by skrll@ (adapted to include reg::r_gbr).
struct mcontext != struct reg on sh3.

    Fix PTHREAD_UCONTEXT_TO_REG / PTHREAD_REG_TO_UCONTEXT to deal with this.
2008-10-27 00:47:22 +00:00
mrg
fb8d95d826 check for ${PTHREAD_MACHINE_ARCH} before ${MACHINE_ARCH} or ${MACHINE_CPU} 2008-10-26 00:00:27 +00:00
yamt
639a0868fd remove ; after __weak_alias() 2008-10-25 14:14:11 +00:00
snj
682ea0e2b3 s/explicitely/explicitly/ 2008-10-19 21:27:46 +00:00
rmind
43819fe5ab Do not recommend to mix affinity(3) with pset(3). 2008-10-18 03:37:41 +00:00
ad
6f7d0483cf pthread_attr_getschedparam: allow without preceding setparam on the
attr structure.
2008-10-10 09:13:20 +00:00
ad
8572b64ab0 Clarifications for PTHREAD_DIAGASSERT. 2008-10-08 10:11:11 +00:00
ad
beaa63b638 Disable diagnostic assertions by default and just return error codes like
other systems. Allows poorly written applications to appear working. If you
are developing pthread apps please turn it on manually by setting the
environment variable.
2008-10-08 10:03:28 +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
rmind
0f80b1578d Arguments were swapped for cpuset_set(), cpuset_clr(), cpuset_isset()
functions, but man pages were not updated (hi Christos!).
2008-09-12 13:39:04 +00:00
skrll
0b99767bfe Remove unnecessary include. 2008-08-11 21:45:24 +00:00
matt
2b0c4dcffd Change pthread_mutex_t to use the amount of space as and be congruent to
the version used in the SA version of pthreads.  This preserves binary
compatibility between both versions of the library.
2008-08-02 19:46:30 +00:00
matt
c0038aadef Change some type to eliminate some lint warnings. 2008-08-02 16:02:26 +00:00
pooka
6ebb8696c9 add pthread_cond_has_waiters_np() 2008-07-18 16:17:11 +00:00