| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
ld can find the newest version which is default.
Poked by: kan@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now type sema_t is a structure which can be put in a shared memory area,
and multiple processes can operate it concurrently.
User can either use mmap(MAP_SHARED) + sem_init(pshared=1) or use sem_open()
to initialize a shared semaphore.
Named semaphore uses file system and is located in /tmp directory, and its
file name is prefixed with 'SEMD', so now it is chroot or jail friendly.
In simplist cases, both for named and un-named semaphore, userland code
does not have to enter kernel to reduce/increase semaphore's count.
The semaphore is designed to be crash-safe, it means even if an application
is crashed in the middle of operating semaphore, the semaphore state is
still safely recovered by later use, there is no waiter counter maintained
by userland code.
The main semaphore code is in libc and libthr only has some necessary stubs,
this makes it possible that a non-threaded application can use semaphore
without linking to thread library.
Old semaphore implementation is kept libc to maintain binary compatibility.
The kernel ksem API is no longer used in the new implemenation.
Discussed on: threads@
|
|
|
|
|
|
|
| |
This is required by POSIX and matches open(2).
Reviewed by: kib, jhb
MFC after: 1 month
|
|
|
|
|
|
|
| |
use stack space to keep cleanup information, this eliminates overhead of
calling malloc() and free() in thread library.
Discussed on: thread@
|
|
|
|
| |
time clock id.
|
| |
|
|
|
|
| |
get and set thread's cpu affinity mask.
|
|
|
|
| |
its contents to FBSDprivate_1.0.
|
|
|
|
|
|
| |
the Makefile accordingly; libthr now explicitly uses libc's Versions.def.
MFC after: 2 weeks
|
|
|
|
| |
are new in FreeBSD 8 to the appropriate namespace.
|
| |
|
|
|
|
|
|
|
| |
locked. This is intended primarily to support the userland equivalent
of the various *_ASSERT_LOCKED() macros we have in the kernel.
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
|
| |
loop count.
2. Add function pthread_mutex_setyieldloops_np to turn a mutex's yield
loop count.
3. Make environment variables PTHREAD_SPINLOOPS and PTHREAD_YIELDLOOPS
to be only used for turnning PTHREAD_MUTEX_ADAPTIVE_NP mutex.
|
|
|
|
|
| |
(part of libc) can use pthreads mutexes without causing infinite recursion
during initialization.
|
|
|
|
|
|
|
|
|
|
| |
Warning, after symbol versioning is enabled, going back is not easy
(use WITHOUT_SYMVER at your own risk).
Change the default thread library to libthr.
There most likely still needs to be a version bump for at least the
thread libraries. If necessary, this will happen later.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
wait(), waitpid() and usleep(), they are internal versions and
should not be cancellation points.
2. Make wait3() as a cancellation point.
3. Move raise() and pause() into file thr_sig.c.
4. Add functions _sigsuspend, _sigwait, _sigtimedwait and _sigwaitinfo,
remove SIGCANCEL bit in wait-set for those functions, the signal is
used internally to implement thread cancellation.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
2. Reuse current timer code and abstract some common code to
to support both timer and mqueue.
|
|
|
|
|
|
| |
is LIBTHREAD_1_0, but really it should be LIBPTHREAD_1_0.
Fix it so libmap.conf works again (it was broken by recent versioning
code in rtld_elf).
|
|
|
|
|
|
| |
rewritten, now timers created with same sigev_notify_attributes will
run in same thread, this allows user to organize which timers can
run in same thread to save some thread resource.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
_pthread_mutexattr_getpshared
_pthread_mutexattr_setpshared
pthread_condattr_getpshared
pthread_condattr_setpshared
pthread_mutexattr_getpshared
pthread_mutexattr_setpshared
|
| |
|
|
|
|
|
| |
except the function will return ETIMEDOUT if target thread does not exit
before specified absolute time passes.
|
|
|
|
| |
Noticed by: davidxu
|
|
|
|
| |
events are reported.
|
| |
|
|
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
|