#
272461 |
|
02-Oct-2014 |
gjb |
Copy stable/10@r272459 to releng/10.1 as part of the 10.1-RELEASE process.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
218414 |
|
07-Feb-2011 |
jkim |
Introduce a non-portable function pthread_getthreadid_np(3) to retrieve calling thread's unique integral ID, which is similar to AIX function of the same name. Bump __FreeBSD_version to note its introduction.
Reviewed by: kib
|
#
216641 |
|
22-Dec-2010 |
davidxu |
MFp4:
- Add flags CVWAIT_ABSTIME and CVWAIT_CLOCKID for umtx kernel based condition variable, this should eliminate an extra system call to get current time.
- Add sub-function UMTX_OP_NWAKE_PRIVATE to wake up N channels in single system call. Create userland sleep queue for condition variable, in most cases, thread will wait in the queue, the pthread_cond_signal will defer thread wakeup until the mutex is unlocked, it tries to avoid an extra system call and a extra context switch in time window of pthread_cond_signal and pthread_mutex_unlock.
The changes are part of process-shared mutex project.
|
#
201565 |
|
05-Jan-2010 |
davidxu |
remove file thr_sem_new.c.
|
#
201546 |
|
05-Jan-2010 |
davidxu |
Use umtx to implement process sharable semaphore, to make this work, 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@
|
#
177494 |
|
22-Mar-2008 |
davidxu |
Add POSIX pthread API pthread_getcpuclockid() to get a thread's cpu time clock id.
|
#
176763 |
|
03-Mar-2008 |
davidxu |
Implement functions pthread_getaffinity_np and pthread_setaffinity_np to get and set thread's cpu affinity mask.
|
#
157457 |
|
04-Apr-2006 |
davidxu |
WARNS level 4 cleanup.
|
#
157194 |
|
27-Mar-2006 |
davidxu |
Remove priority mutex code because it does not work correctly, to make it work, turnstile like mechanism to support priority propagating and other realtime scheduling options in kernel should be available to userland mutex, for the moment, I just want to make libthr be simple and efficient thread library.
Discussed with: deischen, julian
|
#
157112 |
|
25-Mar-2006 |
davidxu |
Compile thr_rtld.c
|
#
155890 |
|
22-Feb-2006 |
davidxu |
Disable POSIX SIGEV_THREAD notification support, soon we will have a common library which can be reused both for libthr and libpthread.
|
#
154130 |
|
09-Jan-2006 |
davidxu |
Rescue pthread_set_name_np for compatible reason, remove unused code.
|
#
151871 |
|
30-Oct-2005 |
davidxu |
Add timer_create wrapper.
|
#
144921 |
|
12-Apr-2005 |
davidxu |
Add debugger event reporting support, current only TD_CREATE and TD_DEATH events are reported.
|
#
144518 |
|
01-Apr-2005 |
davidxu |
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
|
#
131181 |
|
27-Jun-2004 |
mtm |
Implement pthread_atfork in libthr. This is mostly from deichen's work in libpthread.
Submitted by: Dan Nelson <dnelson@allantgroup.com>
|
#
129484 |
|
20-May-2004 |
mtm |
Make libthr async-signal-safe without costly signal masking. The guidlines I followed are: Only 3 functions (pthread_cancel, pthread_setcancelstate, pthread_setcanceltype) are required to be async-signal-safe by POSIX. None of the rest of the pthread api is required to be async-signal-safe. This means that only the three mentioned functions are safe to use from inside signal handlers. However, there are certain system/libc calls that are cancellation points that a caller may call from within a signal handler, and since they are cancellation points calls have to be made into libthr to test for cancellation and exit the thread if necessary. So, the cancellation test and thread exit code paths must be async-signal-safe as well. A summary of the changes follows:
o Almost all of the code paths that masked signals, as well as locking the pthread structure now lock only the pthread structure. o Signals are masked (and left that way) as soon as a thread enters pthread_exit(). o The active and dead threads locks now explicitly require that signals are masked. o Access to the isdead field of the pthread structure is protected by both the active and dead list locks for writing. Either one is sufficient for reading. o The thread state and type fields have been combined into one three-state switch to make it easier to read without requiring a lock. It doesn't need a lock for writing (and therefore for reading either) because only the current thread can write to it and it is an integer value. o The thread state field of the pthread structure has been eliminated. It was an unnecessary field that mostly duplicated the flags field, but required additional locking that would make a lot more code paths require signal masking. Any truly unique values (such as PS_DEAD) have been reborn as separate members of the pthread structure. o Since the mutex and condvar pthread functions are not async-signal-safe there is no need to muck about with the wait queues when handling a signal ... o ... which also removes the need for wrapping signal handlers and sigaction(2). o The condvar and mutex async-cancellation code had to be revised as a result of some of these changes, which resulted in semi-unrelated changes which would have been difficult to work on as a separate commit, so they are included as well.
The only part of the changes I am worried about is related to locking for the pthread joining fields. But, I will take a closer look at them once this mega-patch is committed.
|
#
127523 |
|
28-Mar-2004 |
mtm |
Remove the garbage collector thread. All resources are freed in-line. If the exiting thread cannot release a resource, then the next thread to exit will release it.
|
#
126000 |
|
19-Feb-2004 |
mtm |
Implement PThreads barriers and barrier attributes.
|
#
125971 |
|
18-Feb-2004 |
mtm |
Remove thr_getschedparam.c since it's contents have been moved into thr_setschedparam.c
|
#
123348 |
|
09-Dec-2003 |
mtm |
o Add a wrapper around sigaction(2), so we can insert our own wrapper around signals. o Lock the process global signal action table.
|
#
113729 |
|
19-Apr-2003 |
jdp |
Add stub implementations of pthread_[gs]etconcurrency to libc_r and libthr. No changes were made to libpthread by request of deischen, who will soon commit a real implementation for that library.
PR: standards/50848 Submitted by: Sergey A. Osokin <osa@freebsd.org.ru> MFC after: 1 week
|
#
112918 |
|
01-Apr-2003 |
jeff |
- Add libthr but don't hook it up to the regular build yet. This is an adaptation of libc_r for the thr system call interface. This is beta quality code.
|