#
dbc6f4c0 |
| 30-Jun-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
Sweep through pthread locking and use the new locking primitives for libthr.
|
Revision tags: release/5.1.0_cvs, release/5.1.0 |
|
#
43844120 |
| 02-Jun-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
Consolidate static_init() and static_init_private into one function. The behaviour of this function is controlled by the argument: private.
|
#
6e1aa51e |
| 31-May-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
I botched one of my committs in the last round. Fix it.
|
#
1b2a19ce |
| 29-May-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
Make the mutex static initializers look more like the one for condition variables. Cosmetic.
Explicitly compare against PTHREAD_MUTEX_INITIALIZER. We shouldn't encourage calls to the mutex functions
Make the mutex static initializers look more like the one for condition variables. Cosmetic.
Explicitly compare against PTHREAD_MUTEX_INITIALIZER. We shouldn't encourage calls to the mutex functions with null pointers to mutexes.
Approved by: re/jhb
show more ...
|
#
7d9d7ca2 |
| 23-May-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
Make WARNS2 clean. The fixes mostly included: o removed unused variables o explicit inclusion of header files o prototypes for externally defined functions
Approved by: re/blanket libthr
|
#
6439d4c2 |
| 21-May-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
Insert a debugging aid: When in either the mutex or cond queue we notice that the thread is already on one of the queues, don't just simply abort(). Print out the thread's identifiers and what que
Insert a debugging aid: When in either the mutex or cond queue we notice that the thread is already on one of the queues, don't just simply abort(). Print out the thread's identifiers and what queue it was on.
Approved by: markm/mentor, re/blanket libthr
show more ...
|
#
c984b5a7 |
| 12-May-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
msg1
|
#
ae0df91f |
| 06-May-2003 |
Mike Makonnen <mtm@FreeBSD.org> |
o Correct a debug message that refered to the wrong function o Remove an unncecesary if clause
Approved by: markm (mentor)(implicit) Reviewd by: jeff
|
Revision tags: release/4.8.0_cvs, release/4.8.0 |
|
#
26f52e2f |
| 02-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Define curthread as _get_curthread() and remove all direct calls to _get_curthread(). This is similar to the kernel's curthread. Doing this saves stack overhead and is more convenient to th
- Define curthread as _get_curthread() and remove all direct calls to _get_curthread(). This is similar to the kernel's curthread. Doing this saves stack overhead and is more convenient to the programmer. - Pass the pointer to the newly created thread to _thread_init(). - Remove _get_curthread_slow().
show more ...
|
#
360a5194 |
| 02-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- Restore old mutex code from libc_r. It is more standards compliant. This was changed because originally we were blocking on the umtx and allowing the kernel to do the queueing. It was decid
- Restore old mutex code from libc_r. It is more standards compliant. This was changed because originally we were blocking on the umtx and allowing the kernel to do the queueing. It was decided that the lib should queue and start the threads in the order it decides and the umtx code would just be used like spinlocks.
show more ...
|
#
bb535300 |
| 01-Apr-2003 |
Jeff Roberson <jeff@FreeBSD.org> |
- 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.
|
Revision tags: release/8.1.0_cvs, release/8.1.0, release/7.3.0_cvs, release/7.3.0, release/8.0.0_cvs, release/8.0.0, release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
#
7de1ecef |
| 24-Jun-2008 |
David Xu <davidxu@FreeBSD.org> |
Add two commands to _umtx_op system call to allow a simple mutex to be locked and unlocked completely in userland. by locking and unlocking mutex in userland, it reduces the total time a mutex is loc
Add two commands to _umtx_op system call to allow a simple mutex to be locked and unlocked completely in userland. by locking and unlocking mutex in userland, it reduces the total time a mutex is locked by a thread, in some application code, a mutex only protects a small piece of code, the code's execution time is less than a simple system call, if a lock contention happens, however in current implemenation, the lock holder has to extend its locking time and enter kernel to unlock it, the change avoids this disadvantage, it first sets mutex to free state and then enters kernel and wake one waiter up. This improves performance dramatically in some sysbench mutex tests.
Tested by: kris Sounds great: jeff
show more ...
|
#
850f4d66 |
| 29-May-2008 |
David Xu <davidxu@FreeBSD.org> |
- Reduce function call overhead for uncontended case. - Remove unused flags MUTEX_FLAGS_* and their code. - Check validity of the timeout parameter in mutex_self_lock().
|
#
dd77f9f7 |
| 26-Apr-2008 |
Kris Kennaway <kris@FreeBSD.org> |
Increase the default MUTEX_ADAPTIVE_SPINS to 2000, after further testing it turns out 200 was too short to give good adaptive performance.
Reviewed by: jeff MFC after: 1 week
|
#
7e0e7824 |
| 25-Mar-2008 |
Ruslan Ermilov <ru@FreeBSD.org> |
Fixed mis-implementation of pthread_mutex_get{spin,yield}loops_np().
Reviewed by: davidxu
|
Revision tags: release/7.0.0_cvs, release/7.0.0 |
|
#
096ba447 |
| 14-Feb-2008 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
_pthread_mutex_isowned_np(): use a more reliable method; the current code will work in simple cases, but may fail in more complicated ones.
Reviewed by: davidxu
|
#
d29b081f |
| 06-Feb-2008 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Remove unnecessary prototype.
|
#
1cbdac26 |
| 06-Feb-2008 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Per discussion on -threads, rename _islocked_np() to _isowned_np().
|
#
fcd61d91 |
| 04-Feb-2008 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
After careful consideration (and a brief discussion with attilio@), change the semantics of pthread_mutex_islocked_np() to return true if and only if the mutex is held by the current thread.
Obvious
After careful consideration (and a brief discussion with attilio@), change the semantics of pthread_mutex_islocked_np() to return true if and only if the mutex is held by the current thread.
Obviously, change the regression test to match.
MFC after: 2 weeks
show more ...
|
#
5fd410a7 |
| 03-Feb-2008 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is locked. This is intended primarily to support the userland equivalent of the various *_ASSERT_LOCKED() macros we have in the ke
Add pthread_mutex_islocked_np(), a cheap way to verify that a mutex is 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
show more ...
|
Revision tags: release/6.3.0_cvs, release/6.3.0 |
|
#
c5f41151 |
| 17-Dec-2007 |
David Xu <davidxu@FreeBSD.org> |
Add function prototypes.
|
#
093fcf16 |
| 14-Dec-2007 |
David Xu <davidxu@FreeBSD.org> |
1. Add function pthread_mutex_setspinloops_np to turn a mutex's spin loop count. 2. Add function pthread_mutex_setyieldloops_np to turn a mutex's yield loop count. 3. Make environment variables
1. Add function pthread_mutex_setspinloops_np to turn a mutex's spin 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.
show more ...
|
#
6a663207 |
| 11-Dec-2007 |
David Xu <davidxu@FreeBSD.org> |
Enclose all code for macro ENQUEUE_MUTEX in do while statement, and add missing brackets.
MFC: after 1 day
|
#
b6b7fd3e |
| 28-Nov-2007 |
Jason Evans <jasone@FreeBSD.org> |
Fix pointer dereferencing problems in _pthread_mutex_init_calloc_cb() that were obscured by pseudo-opaque pthreads API pointer casting.
|
#
e1636e1f |
| 27-Nov-2007 |
Jason Evans <jasone@FreeBSD.org> |
Add _pthread_mutex_init_calloc_cb() to libthr and libkse, so that malloc(3) (part of libc) can use pthreads mutexes without causing infinite recursion during initialization.
|