marcel
7644b9ad9f
MFC TLS fixes.
2006-09-02 01:16:56 +00:00
davidxu
079331a84f
MFC thr_cancel.c revision 1.12
...
thr_kern.c revision 1.20
thr_private.h revision 1.58
thr_sig.c revision 1.16, 1.17
thr_rtld.c revision 1.0-1.2
Add rtld locking support.
Approved by: re (scottl)
2006-04-04 23:23:50 +00:00
davidxu
5298b1d72e
MFC revision 1.31.
...
Approved by: re (scottl)
2006-04-04 23:21:22 +00:00
cvs2svn
4b6b4cf9d9
This commit was manufactured by cvs2svn to create branch 'RELENG_6'.
2006-04-04 04:11:56 +00:00
davidxu
272a5d8381
MFC revision 1.6.
...
Approved by: re (scottl)
2006-02-23 03:56:03 +00:00
davidxu
b4e34cc926
MFC:
...
Add missing symbol pthread_set_name_np.
2006-01-24 02:04:21 +00:00
davidxu
e50006f0c9
MFC:
...
Sync with HEAD.
2006-01-16 05:36:30 +00:00
davidxu
93b322a2d4
Sync version number with libpthread.
2005-12-26 12:30:53 +00:00
davidxu
deba570ebe
MFC revision 1.20:
...
Clear return code to zero if joiner successfully waited joinee.
2005-12-22 01:50:44 +00:00
davidxu
7002fc652f
MFC revision 1.35:
...
Remove unused _get_curthread() call.
2005-12-15 07:28:19 +00:00
davidxu
94186b25f2
MFC Revision 1.8:
...
Put pthread_condattr_init sorted order.
Revision 1.7:
Export following functions:
_pthread_mutexattr_getpshared
_pthread_mutexattr_setpshared
pthread_condattr_getpshared
pthread_condattr_setpshared
pthread_mutexattr_getpshared
pthread_mutexattr_setpshared
Revision 1.6:
Sort function names.
Revision 1.5:
Add function pthread_timedjoin_np.
2005-12-15 06:43:18 +00:00
davidxu
4fbab286c2
MFC:
...
thr_exit.c:
Revision 1.19
Fix code for user stack recycling.
thr_join.c:
Revision 1.18
Fix code for user stack recycling.
Revision 1.17
Add function pthread_timedjoin_np.
2005-12-15 06:36:57 +00:00
davidxu
c031264bec
MFC revision 1.3:
...
Add functions pthread_mutexattr_setpshared and
pthread_mutexattr_getpshared.
2005-12-15 06:31:43 +00:00
davidxu
0a05924128
MFC Revision 1.11:
...
In raise(), use a shortcut to directly send signal to current thread.
MFC Revision 1.12:
Remove a redundant _get_curthread() call.
2005-12-01 00:49:45 +00:00
davidxu
cd55799acc
MFC revision 1.24:
...
> The pthread_attr_set_createsuspend_np was broken, fix it by
> replacing THR_FLAGS_SUSPENDED with THR_FLAGS_NEED_SUSPEND.
Approved by: re (scottl)
2005-10-11 23:24:25 +00:00
delphij
7eae1cb08f
MFC (by deischen)
...
| Add usleep to the map files.
|
| Noticed by: davidxu
|
| Revision Changes Path
| 1.15 +2 -0 src/lib/libpthread/pthread.map
| 1.4 +2 -0 src/lib/libthr/pthread.map
Approved by: re (kensmith)
Ok'ed by: deischen, davidxu
2005-10-08 17:58:11 +00:00
delphij
c87122e6d8
MFC (by deischen)
...
| Add a cancellation point for usleep().
|
| While here, fix sleep() so that it is also a cancellation point (a
| missing weak reference prevented that).
|
| Revision Changes Path
| 1.10 +19 -0 src/lib/libthr/thread/thr_syscalls.c
Approved by: re (kensmith)
Ok'ed by: deischen, davidxu
2005-10-08 17:57:28 +00:00
jhb
0ef1901fa9
MFC: Convert the atomic pointer operations to operate on uintptr_t rather
...
than void *.
Approved by: re (kensmith)
2005-08-05 19:44:00 +00:00
kensmith
1f1979ea2c
Insta-MFC of the shared library version bump. All shared libraries
...
whose version has not already been bumped since RELENG_5 are being
bumped.
Revisions of files being MFC-ed:
> Path Revision
> src/gnu/lib/libdialog/Makefile 1.43
> src/gnu/lib/libg2c/Makefile 1.16
> src/gnu/lib/libobjc/Makefile 1.27
> src/gnu/lib/libreadline/Makefile.inc 1.12
> src/gnu/lib/libregex/Makefile 1.32
> src/gnu/lib/libstdc++/Makefile 1.56
> src/kerberos5/lib/Makefile.inc 1.7
> src/lib/Makefile.inc 1.3
> src/lib/libalias/Makefile 1.31
> src/lib/libarchive/Makefile 1.37
> src/lib/libbegemot/Makefile 1.3
> src/lib/libbluetooth/Makefile 1.2
> src/lib/libbsnmp/Makefile.inc 1.6
> src/lib/libbz2/Makefile 1.6
> src/lib/libc_r/Makefile 1.42
> src/lib/libcrypt/Makefile 1.36
> src/lib/libdevstat/Makefile 1.15
> src/lib/libdevstat/devstat.h 1.11
> src/lib/libedit/Makefile 1.29
> src/lib/libexpat/Makefile 1.5
> src/lib/libfetch/Makefile 1.45
> src/lib/libftpio/Makefile 1.14
> src/lib/libgpib/Makefile 1.2
> src/lib/libipsec/Makefile 1.17
> src/lib/libkiconv/Makefile 1.3
> src/lib/libmagic/Makefile 1.7
> src/lib/libmp/Makefile 1.10
> src/lib/libncp/Makefile 1.6
> src/lib/libncurses/Makefile 1.79
> src/lib/libnetgraph/Makefile 1.11
> src/lib/libngatm/Makefile 1.6
> src/lib/libopie/Makefile 1.21
> src/lib/libpam/Makefile.inc 1.17
> src/lib/libpthread/Makefile 1.54
> src/lib/libradius/Makefile 1.12
> src/lib/libsdp/Makefile 1.4
> src/lib/libsmb/Makefile 1.8
> src/lib/libtacplus/Makefile 1.7
> src/lib/libthr/Makefile 1.14
> src/lib/libthread_db/Makefile 1.6
> src/lib/libugidfw/Makefile 1.7
> src/lib/libusbhid/Makefile 1.10
> src/lib/libutil/Makefile 1.57
> src/lib/libvgl/Makefile 1.11
> src/lib/libwrap/Makefile 1.17
> src/lib/libypclnt/Makefile 1.13
> src/lib/msun/Makefile 1.72
> src/secure/lib/libcrypto/Makefile 1.74
> src/secure/lib/libssh/Makefile 1.35
> src/secure/lib/libssl/Makefile 1.22
> src/usr.sbin/bsnmpd/modules/Makefile.inc 1.10
Reviewed by: ru
Approved by: re (scottl)
2005-07-22 17:29:10 +00:00
davidxu
4a65a73e58
Fix off-by-one nanosecond bug in macro TIMESPEC_ADD.
...
Reviewed by: deischen
Approved by: re (dwhite)
MFC after : 4 days
2005-06-22 22:38:56 +00:00
ru
7cec114952
Markup fixes.
...
Approved by: re
2005-06-16 19:01:07 +00:00
rwatson
cbb1ab3809
Remove incorrect BUGS entry: libthr does support process-scope thread
...
scheduling.
MFC after: 1 week
Submitted by: davidxu
Approved by: re (scottl)
2005-06-15 15:21:10 +00:00
rwatson
dffb6088ac
Add a stub libthr(3) man page to document what it is and why, as well as
...
to point at libmap.conf(5). This will help answer questions about what
and why it is, although not in great detail.
Approved by: re (scottl)
MFC after: 1 week
MFC note: When MFC'd, don't MFC mention of work not yet MFC'd.
2005-06-11 15:27:56 +00:00
davidxu
094168eea8
Remove COMPAT_32BIT, it is no longer needed.
2005-04-27 01:29:03 +00:00
davidxu
9f7f211673
Remove unused variable.
2005-04-23 03:34:43 +00:00
davidxu
8d38949442
Now libthr only uses GDT based tls on i386. using LDT can only increase
...
clock cycles and has 8191 threads limitation.
2005-04-23 03:31:59 +00:00
davidxu
a0a25ee25d
Use thr_new syscall to create a new thread, obscure context operations
...
is no longer needed.
2005-04-23 02:48:59 +00:00
davidxu
d75a2adc3f
Add i386_get_gsbase, i386_set_gsbase since old libc doesn't have the
...
functions, otherwise user ports have to be rebuilt.
2005-04-23 02:14:38 +00:00
peter
c1d476c931
Adapt the libpthread patch for using i386_set_gsbase() to libthr.
2005-04-14 00:44:07 +00:00
davidxu
3093d067e4
Conditionally report initial thread event.
2005-04-12 03:13:49 +00:00
davidxu
bc36c64c8d
Add missing event reporting code.
2005-04-12 03:08:11 +00:00
davidxu
2cf5eeb001
Add debugger event reporting support, current only TD_CREATE and TD_DEATH
...
events are reported.
2005-04-12 03:00:28 +00:00
cognet
c7b04f713a
Use the new atomic_cmpset_32().
2005-04-07 22:06:05 +00:00
davidxu
22b6b1a4cf
Adjust hash function for smaller pthread structure size.
2005-04-07 06:09:17 +00:00
davidxu
ed60415691
Remove unique id field which is no longer used by debugger.
2005-04-06 13:57:31 +00:00
davidxu
a991e5caf8
Remove debug symbol from installed library, one can always
...
use compiled version in libthr directory.
2005-04-06 13:48:11 +00:00
davidxu
1b586b1fd5
Pass exact number of threads.
2005-04-04 23:43:53 +00:00
davidxu
399fdd028a
Export pthread_condattr_getclock, pthread_condattr_setclock.
2005-04-03 23:52:29 +00:00
davidxu
f066519e91
Import my recent 1:1 threading working. some features improved includes:
...
1. fast simple type mutex.
2. __thread tls works.
3. asynchronous cancellation works ( using signal ).
4. thread synchronization is fully based on umtx, mainly, condition
variable and other synchronization objects were rewritten by using
umtx directly. those objects can be shared between processes via
shared memory, it has to change ABI which does not happen yet.
5. default stack size is increased to 1M on 32 bits platform, 2M for
64 bits platform.
As the result, some mysql super-smack benchmarks show performance is
improved massivly.
Okayed by: jeff, mtm, rwatson, scottl
2005-04-02 01:20:00 +00:00
marcus
a424dc9347
Increase the default stacksizes:
...
32-bit 64-bit
main thread 2 MB 4 MB
other threads 1 MB 2 MB
Approved by: mtm
Adapted from: libpthread
2005-03-06 07:56:18 +00:00
peter
5d3a1b43b0
Fix inverted #ifdef that I added. Who had the pointy hat last?
...
Submitted by: kan
2004-12-06 20:41:09 +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
peter
6185c69a2b
Use the recently exposed fs/gs set functions when compiling libthr to
...
run as a 32 bit support library for an amd64 kernel. 32 bit consumers of
libthr have zero chance of running on an amd64 kernel since we don't
implement the i386_set_ldt() family of functions. Note that this commit
doesn't make it actually work, it just removes one more obstacle.
2004-11-06 03:30:53 +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
mtm
ce193bdc46
1. Now that it's a thread's state is changed from within the kernel, where
...
no userland locks are heald, the dead thread lock can no longer protect
access to it. Therefore, instead of using an if (!dead)...else clause
after walking the active threads list test the thread pointer before
deciding not to walk the dead threads list. If the thread pointer is null
it means it was not found in the active threads list and the dead threads
list should be checked.
2. Do not free the stack of a thread that is not marked dead. This is the
2nd and final part of eliminating the race to free a thread's stack.
MFC after: 3 days
2004-10-13 11:42:20 +00:00
mtm
9c7869cb6f
Remove a reference to a non-existent syscall: _thr_exit(). The
...
actual name is thr_exit(). How this ever worked is beyond me.
2004-10-08 14:48:02 +00:00
mtm
0a21f474dc
Close a race between a thread exiting and the freeing of it's stack.
...
After some discussion the best option seems to be to signal the thread's
death from within the kernel. This requires that thr_exit() take an
argument.
Discussed with: davidxu, deischen, marcel
MFC after: 3 days
2004-10-06 14:23:00 +00:00
mtm
18e7a48541
Remove vestiges of libthr's signal mangling past. This fixes that last
...
known problem with mysql on libthr: not being able to kill mysqld.
2004-09-22 18:51:16 +00:00
mtm
59b52ed829
The SUSv3 function say that the affected functions MAY FAIL, if the
...
specified mutex is invalid. In spec parlance 'MAY FAIL' means it's
up to the implementor. So, remove the check for NULL pointers for two
reasons:
1. A mutex may be invalid without necessarily being NULL.
2. If the pointer to the mutex is NULL core-dumping in the
vicinity of the problem is much much much better than failing
in some other part of the code (especially when the application
doesn't check the return value of the function that you oh so
helpfully set to EINVAL).
2004-09-22 16:53:23 +00:00
mtm
3626bc4706
Implement cancellation points in libc interfaces, as specified by POSIX.
2004-09-16 13:55:46 +00:00