tegge
aa695ee90e
Backout unblocking of signal if no threads can currently handle it.
...
The check for pending signal after direct invocation of signal handler
is sufficient.
2006-10-14 01:11:44 +00:00
tegge
d21c14576e
Delay unblocking signal and restoring process signal mask until the
...
thread signal mask has been updated to avoid stack overflow during signal
bursts.
Don't block signal forever if no threads can currently handle signal.
Check for pending signal after direct invocation of signal handler.
2006-10-13 20:12:07 +00:00
tegge
8f000653f2
Delay setting wakeup time until after poll array has been allocated.
...
Blocking on the malloc spinlock would cause the select timeout to be lost.
2006-10-13 20:04:13 +00:00
tegge
6ddeb6ab39
Sync thread jump table with libc and other thread libraries.
2006-10-13 20:01:40 +00:00
ru
4d582ffe09
Remove alpha left-overs.
2006-08-22 08:03:01 +00:00
ru
6f911199b8
Fix a symlink.
2006-04-12 19:51:14 +00:00
ru
5f8b6d3c5a
Convert NO_PROFILE and NO_LIB32 to new style.
2006-03-18 21:37:05 +00:00
stefanf
cb1c3eea78
- Prefix MUTEX_TYPE_MAX with PTHREAD_ to avoid namespace pollution.
...
- Remove the macros MUTEX_TYPE_FAST and MUTEX_TYPE_COUNTING_FAST.
OK'ed by: deischen
2005-08-19 21:31:42 +00:00
kensmith
f97f77429f
Bump the shared library version number of all libraries that have not
...
been bumped since RELENG_5.
Reviewed by: ru
Approved by: re (not needed for commit check but in principle...)
2005-07-22 17:19:05 +00:00
jhb
a64d1dbf3b
Mark _thread_exit() and __sys_exit() as __dead2 to quiet some warnings.
2005-05-31 19:57:23 +00:00
jhb
b72dd3b4d2
Style tweak.
2005-05-31 19:56:52 +00:00
delphij
4c5083a81c
Provide more POSIX-complaint ttyname_r(3) interface[1], which is slightly
...
different from what has been offered in libc_r (the one spotted in the
original PR which is found in libthr has already been removed by David's
commit, which is rev. 1.44 of lib/libthr/thread/thr_private.h):
- Use POSIX standard prototype for ttyname_r, which is,
int ttyname_r(int, char *, size_t);
Instead of:
char *ttyname_r(int, char *, size_t);
This is to conform IEEE Std 1003.1, 2004 Edition [1].
- Since we need to use standard errno for return code, include
errno.h in ttyname.c
- Update ttyname(3) implementation according to reflect the API
change.
- Document new ttyname_r(3) behavior
- Since we already make use of a thread local storage for
ttyname(3), remove the BUGS section.
- Remove conflicting ttyname_r related declarations found in libc_r.
Hopefully this change should not have changed the API/ABI, as the ttyname_r
symbol was never introduced before the last unistd.h change which happens a
couple of days before.
[1] http://www.opengroup.org/onlinepubs/009695399/functions/ttyname.html
Requested by: Tom McLaughlin <tmclaugh sdf lonestar org>
Through PR: threads/76938
Patched by: Craig Rodrigues <rodrigc crodrigues org> (with minor changes)
Prompted by: mezz@
2005-05-13 16:27:30 +00:00
marcus
3bc669b0fc
Increase the default stacksizes:
...
32-bit 64-bit
main thread 2 MB 4 MB
other threads 1 MB 2 MB
Adapted from: libpthread
Approved by: deischen
2005-02-28 17:15:31 +00:00
hsu
f37d6c57e7
More fixes to the copyright notice.
...
Submitted by: Ken Smith <kensmith@cse.Buffalo.EDU>
2005-01-08 17:16:43 +00:00
hsu
9eb91343d4
Fix copyright notice.
2005-01-08 01:59:36 +00:00
ru
74176cc161
NODOCCOMPRESS -> NO_DOCCOMPRESS
...
NOINFO -> NO_INFO
NOINFOCOMPRESS -> NO_INFOCOMPRESS
NOLINT -> NO_LINT
NOPIC -> NO_PIC
NOPROFILE -> NO_PROFILE
2004-12-21 09:33:47 +00:00
grog
37a87b6214
Add pthread_atfork().
...
PR: bin/68841
Submitted by: Dan Nelson <dnelson@allantgroup.com>
2004-12-10 03:36:45 +00:00
das
130bed6547
Don't include sys/user.h merely for its side-effect of recursively
...
including other headers.
2004-11-27 06:51:39 +00:00
ru
5db2b9d5b3
For variables that are only checked with defined(), don't provide
...
any fake value.
2004-10-24 15:33:08 +00:00
stefanf
bcdeb8e73c
Avoid using void pointers in additive expressions.
...
PR: 56653
2004-08-14 17:46:10 +00:00
cperciva
371e76013c
style cleanup: Remove duplicate $FreeBSD$ tags.
...
These files had tags after teh copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).
Approved by: rwatson (mentor)
2004-02-10 20:45:28 +00:00
deischen
7672c0089a
Correct the link for the profiling library.
2004-01-31 17:00:04 +00:00
deischen
674bc2cc3f
Change libkse back to libpthread and make it the default
...
thread library for i386, amd64, and ia64. For alpha
and sparc64 the library is not changed and remains libkse,
and links are installed so that libpthread -> libc_r.
The gcc -pthread option will be changed in a separate
commit so that it links to -lpthread instead of -lc_r.
Approved by: re@
2004-01-30 12:13:17 +00:00
deischen
74d800d7d0
Initialize the (i386) frame pointer when setting up a thread
...
context.
Submitted by: Marc Olzheim <marcolz@stack.nl>
Tested by: Marc Olzheim <marcolz@stack.nl>
2004-01-22 19:15:08 +00:00
ru
57b6bbbf56
Have a single set of POSIX threads man pages. The LIBRARY section
...
of each manpage lists libraries that have corresponding interfaces
implemented.
Prodded by: threads
Reviewed by: deischen
2004-01-14 21:44:26 +00:00
ru
8eb3bce250
The libc_r/man/sigwait.3 manpage has been repocopied to libc/sys/sigwait.2.
...
Reviewed by: deischen
Repocopy by: markm
2004-01-14 21:22:10 +00:00
ru
0223333b35
- libc/sys/sem.c was repocopied to libc/gen/sem.c.
...
- sem_*(3) manpages were repocopied from libc_r.
Reviewed by: deischen
Repocopy by: markm
2004-01-14 20:54:16 +00:00
deischen
47d6f075e0
MFlibpthread: Add a simple work-around for deadlocking on recursive
...
readlocks on a rwlock while there are writers waiting.
2004-01-08 15:39:12 +00:00
deischen
15847c4488
Reenable signals for threads after joining.
...
Submitted by: Marc Olzheim <marcolz@stack.nl>
2003-12-31 13:41:54 +00:00
ru
c387e07b72
Pull revision 1.13 from libpthread/man/pthread_mutex_init.3:
...
- Remove error code that can't be returned (and original description
was not proper English)
PR: docs/57434
2003-12-30 15:44:16 +00:00
deischen
82fa343f7c
Return to the caller if write() returns 0.
...
PR: 59291
2003-12-17 16:44:03 +00:00
peter
976bb368f6
For the amd64 we need to do some extra stack alignment fixups. Otherwise
...
we can end up with some threads with a non-16-byte-aligned stack. This
causes some interesting side effects, including general protection
faults leading to a SIGBUS when doing floating point or varargs. This
should be just a verbose NOP for the other platforms.
Approved by: re (scottl)
2003-12-03 06:54:40 +00:00
deischen
c568e81b8f
If __sys_write() returns 0, allow that to exit the loop in libc_r's
...
wrapped version of write().
Submitted by: dan@langille.org
2003-09-29 13:41:26 +00:00
ru
cc9d2aeb39
Get rid of duplicates.
2003-09-14 13:41:59 +00:00
ru
1c23ef339b
mdoc(7): Use the new feature of the .In macro.
2003-09-08 19:57:22 +00:00
mp
07991e4a4b
Add wrapper for kqueue() to keep track of the allocated fd and allow it to
...
be closed. This fixes a file descriptor leak when closing a kqueue() fd.
Reviewed by: deischen
MFC after: 1 week
2003-07-25 17:02:33 +00:00
deischen
a9b4c655b3
Remove -D_THREAD_SAFE.
...
Submitted by: Craig Rodrigues <rodrigc@crodrigues.org>
2003-07-13 05:35:30 +00:00
ru
f36e965056
Make libc/${MACHINE_ARCH} include directory not required by Alpha.
...
Submitted by: bde
Tested by: beast
2003-07-02 13:27:54 +00:00
kan
8701d3b8e4
libc/${MACHINE_ARCH} include directory is required by Alpha,
...
add it to CFLAGS.
2003-07-02 01:52:06 +00:00
ru
38009c82b2
Axe AINC.
...
Submitted by: bde
2003-07-01 15:07:01 +00:00
netchild
4521ab44c2
Sanity check fd before using it as an array index.
...
Noticed by: ted@NLnetLabs.nl (Ted Lindgreen)
Approved by: ru
2003-06-09 16:45:37 +00:00
charnier
9efd223c5d
The .Fn function
2003-06-08 10:13:50 +00:00
marcel
25569ea731
Make this compile without warnings on 64-bit architectures:
...
Don't cast thread_self() to int. Cast to uintptr_t. Pull in the
predefined printf format from <inttypes.h>
2003-06-04 20:38:54 +00:00
marcel
ca51ecc2f1
Make this compile without warnings on 64-bit architectures:
...
In recurse(), cast the pointer difference to int to match the format.
The difference is expected to fit in an int.
2003-06-04 20:36:08 +00:00
mtm
96c48e2635
If the library is not able to create a thread because resources
...
don't allow it at the moment, the correct thing to do is try again.
Otherwise, libthr would fail this test because it doesn't allow
an unlimited number of concurrent threads per application.
2003-06-04 08:16:32 +00:00
peter
bc4e199669
Update for amd64 after repocopy from i386/
2003-06-02 22:30:59 +00:00
peter
8f0f81825d
Port libc_r to amd64, and turn it back on for amd64. It passes all of
...
the same src/lib/libc_r/test/* tests that the other platforms pass.
2003-06-02 22:22:52 +00:00
rwatson
4bfad7cc80
Revert accidental change: don't change the thread library for testing to
...
libthr. Oops, sorry about that.
Submitted by: "Simon L. Nielsen" <simon@nitro.dk>
2003-06-02 00:21:41 +00:00
rwatson
7f7e0909c5
Include string.h for memset().
2003-06-01 23:03:49 +00:00
ru
716d37783d
Fixed another bug in the threaded close() call; clear the
...
stale stdio descriptors flags.
PR: bin/51535
Submitted by: Enache Adrian <enache@rdslink.ro>
Reviewed by: deischen
Approved by: re (scottl)
2003-05-31 05:23:20 +00:00