History log of /src/lib/libpthread/pthread_cond.c |
Revision | | Date | Author | Comments |
1.78 |
| 31-Mar-2025 |
riastradh | pthread_cancel(3): Rework.
Make pthread_setcancelstate(3) async-signal-safe. (As a side effect, this also makes pthread_setcanceltype(3) async-signal-safe, although that is not required.)
PR lib/59134: POSIX-1.2024: pthread_setcancelstate must be async-signal-safe
|
1.77 |
| 12-Feb-2022 |
riastradh | branches: 1.77.4; libpthread: Move namespacing include to top of .c files.
Stuff like libc's namespace.h, or atomic_op_namespace.h, which does namespacing tricks like `#define atomic_cas_uint _atomic_cas_uint', has to go at the top of each .c file. If it goes in the middle, it might be too late to affect the declarations, and result in compile errors.
I tripped over this by including <sys/atomic.h> in mips <machine/lock.h>.
(Maybe we should create a new pthread_namespace.h file for the purpose, but this'll do for now.)
|
1.76 |
| 14-Jun-2020 |
ad | Another bug. The CAS loop in pthread_cond_signal() could race against the thread it is trying to awake. The thread could exit the condvar and then reinsert itself at the head of the list with a new waiter behind it. It's likely possible to fix this in a way that's wait-free but for now just fix the bug.
|
1.75 |
| 13-Jun-2020 |
riastradh | Nix trailing whitespace.
|
1.74 |
| 10-Jun-2020 |
ad | - Make pthread_condvar and pthread_mutex work on the stack rather than in pthread_t, so there's less chance of bad things happening if someone calls (for example) pthread_cond_broadcast() from a signal handler.
- Remove all the deferred waiter handling except for the one case that really matters which is transferring waiters from condvar -> mutex on wakeup, and do that by splicing the condvar's waiters onto the mutex.
- Remove the mutex waiters bit as it's another complication that's not strictly needed.
|
1.73 |
| 06-Jun-2020 |
ad | Adjust previous. In the condvar case the wakeup might already have been eaten.
|
1.72 |
| 04-Jun-2020 |
riastradh | Nix trailing whitespace. NFCI.
|
1.71 |
| 03-Jun-2020 |
ad | Deal with a couple of problems with threads being awoken early due to timeouts or cancellation where:
- The restarting thread calls _lwp_exit() before another thread gets around to waking it with _lwp_unpark(), leading to ESRCH (observed by joerg@). (I may have removed a similar check mistakenly over the weekend.)
- The restarting thread considers itself gone off the sleep queue but at the same time another thread is part way through waking it, and hasn't fully completed that operation yet by setting thread->pt_mutexwait = 0. I think that could have potentially lead to the list of waiters getting messed up given the right circumstances.
|
1.70 |
| 01-Jun-2020 |
ad | In the interests of reliability simplify waiter handling more and redo condvars to manage the list of waiters with atomic ops.
|
1.69 |
| 16-May-2020 |
ad | - Try to eliminate a hang in "parked" I've been seeing while stress testing. Centralise wakeup of deferred waiters in pthread__clear_waiters() and use throughout libpthread. Make fewer assumptions. Be more conservative in pthread_mutex when dealing with pending waiters.
- Remove the "hint" argument everywhere since the kernel doesn't use it any more.
|
1.68 |
| 14-Apr-2020 |
joerg | Drop most of the logic associated with pthread__started.
The pthread_cond logic is a questionable optimisation at best and the post-fork logic is plainly broken.
|
1.67 |
| 29-Jan-2020 |
kamil | Use pthread_condattr_t and pthread_cond_t magic fields
Validate _PT_CONDATTR_MAGIC and _PT_COND_MAGIC respectively.
|
1.66 |
| 13-Jan-2020 |
ad | Rip out some very ambitious optimisations around pthread_mutex that are don't buy much. This stuff is hard enough to get right in the kernel let alone userspace, and I don't trust that it's right.
|
1.65 |
| 08-Dec-2017 |
christos | branches: 1.65.4; 1.65.6; unconst the timestamp
|
1.64 |
| 03-Jul-2016 |
christos | GSoC 2016 Charles Cui: Implement thread priority protection based on work by Andy Doran. Also document the get/set pshared thread calls as not implemented, and add a skeleton implementation that is disabled. XXX: document _sched_protect(2).
|
1.63 |
| 31-Jan-2014 |
christos | remove compatibility code for handling CLOCK_MONOTONIC and handle it in the syscall directly.
|
1.62 |
| 31-Jan-2014 |
christos | PR/44756: Sad Clouds: Prevent leakage of errno = ESRCH from _lwp_park. This has two parts: - in pthread_cond_timedwait() if the thread we are trying to unpark exited, retry the the _lwp_park call without it. - pthread_mutex() was affecting errno since it is calling _lwp_park() from pthread_mutex_lock_slow(). preserve the original errno. Note that the example problem still causes an occassional deadlock on machines with many CPUs and it is the same deadlock we observe with named.
|
1.61 |
| 01-Apr-2013 |
christos | for safety, declare mono on the outermost block it is used.
|
1.60 |
| 28-Mar-2013 |
christos | PR/47703: Yasushi Oshima: pthread_cond_timedwait() does not wait after call pthread_condattr_setclock(CLOCK_MONOTONIC)
_lwp_park(2) expects a realtime clock, and it gets passed a monotonic one. Since monotonic < real, it never sleeps. This patch adjusts the monotonic clock to be a real one before it passes is to _lwp_park(2). This is the minimal hacky fix and it will be fixed properly in _lwp_park(2) in the future.
XXX: pullup to 6.
|
1.59 |
| 21-Mar-2013 |
christos | - Allow libpthread to be dlopened again, by providing libc stubs to libpthread. - Fail if the dlopened libpthread does pthread_create(). From manu@ - Discussed at length in the mailing lists; approved by core@ - This was chosen as the least intrusive patch that will provide the necessary functionality. XXX: pullup to 6
|
1.58 |
| 03-Nov-2012 |
christos | add pthread_condattr_setclock(3)
|
1.57 |
| 15-Jun-2012 |
joerg | branches: 1.57.2; Do not mark pthread_cond_timedwait explicitly as inlineable, since it calls pthread__self, which is static.
|
1.56 |
| 02-Nov-2010 |
skrll | branches: 1.56.6; 1.56.8; Spell immediately correctly.
|
1.55 |
| 23-Mar-2010 |
drochner | catch up with the __RENAME of nanosleep(2) a while ago, otherwise we get the compatibility function which assumes a different struct timespec
|
1.54 |
| 18-Jan-2009 |
lukem | fix -Wsign-compare issues
|
1.53 |
| 25-Oct-2008 |
yamt | branches: 1.53.2; 1.53.4; remove ; after __weak_alias()
|
1.52 |
| 02-Aug-2008 |
matt | Change some type to eliminate some lint warnings.
|
1.51 |
| 18-Jul-2008 |
pooka | add pthread_cond_has_waiters_np()
|
1.50 |
| 28-Jun-2008 |
ad | Avoid spurious assertion failure.
|
1.49 |
| 23-Jun-2008 |
ad | Split cond_signal/cond_broadcast into inline and non-inline parts, like the kernel.
|
1.48 |
| 21-Jun-2008 |
ad | PR lib/38948: libpthread, java: thread awakening itself
|
1.47 |
| 26-May-2008 |
ad | Add a comment describing some limitiations of this implementation.
|
1.46 |
| 26-May-2008 |
ad | - Eliminate one test+branch. - Fix a comment. - Fix a lock leak.
|
1.45 |
| 25-May-2008 |
ad | pthread_cond_timedwait: don't leak EINTR or EALREADY to the caller.
|
1.44 |
| 25-May-2008 |
ad | Fix error in previous.
|
1.43 |
| 25-May-2008 |
ad | PR lib/38741 priority inversion in libpthread breaks apps that use SCHED_FIFO threads
- Change condvar sync so that we never take the condvar's spinlock without first holding the caller-provided mutex. Previously, the spinlock was only taken without the mutex in an error path, but it was enough to trigger the problem described in the PR.
- Even with this change, applications calling pthread_cond_signal/broadcast without holding the interlocking mutex are still subject to the problem described in the PR. POSIX discourages this saying that it leads to undefined scheduling behaviour, which seems good enough for the time being.
- Elsewhere, use a hash of mutexes instead of per-object spinlocks to synchronize entry/exit from sleep queues.
- Simplify how sleep queues are maintained.
|
1.42 |
| 28-Apr-2008 |
martin | branches: 1.42.2; Remove clause 3 and 4 from TNF licenses
|
1.41 |
| 14-Feb-2008 |
ad | branches: 1.41.4; Adjust mutex/rwlock definitions to match reality now that there is only one implementation of each. PR lib/38030.
|
1.40 |
| 24-Dec-2007 |
ad | - Use pthread__cancelled() in more places. - pthread_join(): assert that pthread_cond_wait() returns zero.
|
1.39 |
| 19-Nov-2007 |
ad | Remove the debuglog stuff. ktrace is more useful now.
|
1.38 |
| 13-Nov-2007 |
ad | For PR bin/37347:
- Override __libc_thr_init() instead of using our own constructor. - Add pthread__getenv() and use instead of getenv(). This is used before we are up and running and unfortunatley getenv() takes locks.
Other changes:
- Cache the spinlock vectors in pthread__st. Internal spinlock operations now take 1 function call instead of 3 (i386). - Use pthread__self() internally, not pthread_self(). - Use __attribute__ ((visibility("hidden"))) in some places. - Kill PTHREAD_MAIN_DEBUG.
|
1.37 |
| 13-Sep-2007 |
ad | Add a per-mutex deferred wakeup flag so that threads doing something like the following do not wake other threads early:
pthread_mutex_lock(&mutex); pthread_cond_broadcast(&cond); foo = malloc(100); /* takes libc mutexes */ pthread_mutex_unlock(&mutex);
|
1.36 |
| 08-Sep-2007 |
ad | - Get rid of self->pt_mutexhint and use pthread__mutex_owned() instead. - Update some comments and fix minor bugs. Minor cosmetic changes. - Replace some spinlocks with mutexes and rwlocks. - Change the process private semaphores to use mutexes and condition variables instead of doing the synchronization directly. Spinlocks are no longer used by the semaphore code.
|
1.35 |
| 07-Sep-2007 |
ad | - Don't take the mutex's spinlock (ptr_interlock) in pthread_cond_wait(). Instead, make the deferred wakeup list a per-thread array and pass down the lwpid_t's that way.
- In pthread_cond_wait(), take the mutex before dealing with early wakeup. In this way there should never be contention on the CV's spinlock if the app follows POSIX rules (there should only be contention on the user-provided mutex).
- Add a port of the kernel's rwlocks. The rwlock's spinlock is only taken if there is contention. This is enabled where atomic ops are available. Right now that is only i386 and amd64 because I don't have other hardware to test with. It's trivial to add stubs for other architectures as long as they have compare-and-swap. When we have proper atomic ops the old rwlock code can be removed.
- Add a new mutex implementation that's similar to the kernel's mutexes, but uses compare-and-swap to maintain the waiters list, so no spinlocks are involved. Same caveats apply as for the rwlocks.
|
1.34 |
| 16-Aug-2007 |
ad | branches: 1.34.2; Trim fat off libpthread internal spinlock operations. Makes a mesurable improvement across the board.
|
1.33 |
| 07-Aug-2007 |
ad | Change the signature of _lwp_park() to accept an lwpid_t and second hint pointer, but do so in a way that remains compatible with older pthread libraries. This can be used to wake another thread before the calling thread goes asleep, saving at least one syscall + involuntary context switch. This turns out to be a fairly large win on the condvar benchmarks that I have tried.
|
1.32 |
| 04-Aug-2007 |
ad | branches: 1.32.2; Some significant performance improvements, and a fix for a race with pthread detach/join.
- Make mutex acquire spin for a short time, as done with spinlocks. - Make the number of spins controllable with the env var PTHREAD_NSPINS. - Reduce the amount of time that libpthread internal spinlocks are held. - Rely more on the barrier effects of park/unpark to avoid taking spinlocks. - Simplify the locking around pthreads and the global queues. - Align per-thread sync data on a 128 byte boundary. - Offset thread stacks by a small amount to try and reduce cache thrash.
|
1.31 |
| 12-Apr-2007 |
ad | branches: 1.31.2; Mirror a fix made to the kernel's condvars:
After resuming execution, the thread must check to see if it has been restarted as a result of pthread_cond_signal(). If it has, but cannot take the wakeup (because of eg a pending Unix signal or timeout) then try to ensure that another thread sees it. This is necessary because there may be multiple waiters, and at least one should take the wakeup if possible.
|
1.30 |
| 24-Mar-2007 |
ad | - Test+branch is usually cheaper than making an indirect function call, so avoid making them. - When parking an LWP on a condition variable, point the hint argument at the mutex's waiters queue. Chances are we will be awoken from that later.
|
1.29 |
| 21-Mar-2007 |
ad | Move PTHREADD_ADD(PTHREADD_COND_WOKEUP) back to the correct spot.
|
1.28 |
| 20-Mar-2007 |
ad | - When signalling waiters, try not to awaken them immediatley. If we hold the mutex that the waiters are using to synchronise, then transfer them to the mutex's waiters list so that the wakeup is deferred until release of the mutex. Improves the timings for CV sleep/wakeup by between 30-100% in tests conducted locally on a UP system. There can be a penalty for MP systems when only one thread is being awoken, but in practice I think it won't be be an issue. - pthread_signal: search for a thread that does not have a pending wakeup. Threads can have a pending wakeup and still be on the waiters list if we clash with an earlier pthread_cond_broadcast().
|
1.27 |
| 14-Mar-2007 |
ad | Cosmetic changes.
|
1.26 |
| 05-Mar-2007 |
ad | - Update to match changed pthread__park() interface. - Fix a bug where a thread could be "reentered" onto the waiters queue.
|
1.25 |
| 05-Mar-2007 |
ad | Undo previous, it matches IEEE 1003.1.
|
1.24 |
| 05-Mar-2007 |
ad | Drop the interlock if cancelled.
|
1.23 |
| 02-Mar-2007 |
ad | Fix a sleep/wakeup race with condvars.
|
1.22 |
| 02-Mar-2007 |
ad | Remove the PTHREAD_SA option. If M:N threads is reimplemented it's better off done with a seperate library.
|
1.21 |
| 02-Mar-2007 |
ad | Don't grab the state lock to check for cancellation around condition variables, as _lwp_wakeup/lwp_park provide the necessary barrier.
|
1.20 |
| 24-Dec-2006 |
ad | Fix bugs with and improve upon previous.
|
1.19 |
| 23-Dec-2006 |
ad | Conditionalised support for 1:1 threads. Needs associated kernel changes and more work to be useful.
|
1.18 |
| 06-Jan-2005 |
mycroft | branches: 1.18.10; 1.18.12; gettimeofday();TIMEVAL_TO_TIMESPEC(); is exactly equivalent to clock_gettime(CLOCK_REALTIME), except the latter may have more preicison some day. So, use that.
|
1.17 |
| 10-Dec-2004 |
nathanw | Correctly return ETIMEDOUT when the absolute time is in the past, in the nonthreaded case. Fixes, and fix from, PR lib/25961.
|
1.16 |
| 27-Jul-2004 |
nathanw | In cond_wait() and cond_timedwait(), do the ERRORCHECK testing of the waiters list in all cases, not just on cancellation; there are other sources of spurious wakeups, such as single-stepping in the debugger.
regress/lib/libpthread/conddestroy1 now passes.
|
1.15 |
| 03-May-2004 |
kleink | In the nothread version, don't return EINTR if select() was interrupted since this value is explicitly ruled out by POSIX. Instead, return 0, like a spurious wakeup. From YAMAMOTO Takashi in PR standards/24240.
|
1.14 |
| 24-Nov-2003 |
cl | branches: 1.14.2; Update mutex/rwlock/sem code to match recent change in cond code.
|
1.13 |
| 24-Nov-2003 |
nathanw | Fix a race between timed wait callbacks and manual signal/broadcasting accidentally introduced in rev. 1.5.
Noted by Christian Limpach.
|
1.12 |
| 21-Nov-2003 |
nathanw | Prevent ptc_mutex from remaining set if a CV sleep is woken by cancellation:
* Arrange to not set ptc_mutex until after the pre-sleep cancellation test.
* In the post-sleep cancellation test, check if there are no more sleepers and clear ptc_mutex if so.
While here, sprinkle some __predict_false() around the cancellation tests.
|
1.11 |
| 23-Apr-2003 |
nathanw | Use pthread__error() instead of pthread__abort().
|
1.10 |
| 18-Apr-2003 |
nathanw | More agressive assertions. Change a number of detected conditions, which officially have undefined behavior, from returning an error code to raising an assertion failure. Also, don't bother to explicitly test for (illegal) null pointers and return an error; they'll bomb out soon enough.
|
1.9 |
| 16-Apr-2003 |
nathanw | When a thread sleeps on a mutex or cv, have it put itself on the front of the sleep queue rather than the back. This is more cache-friendly behavior and within the (lack of) constraints on wakeup ordering imposed on equal-priority threads.
|
1.8 |
| 08-Mar-2003 |
lukem | add __RCSID()
|
1.7 |
| 15-Feb-2003 |
nathanw | Remove debug toggle and add debug counter for signals and broadcasts that actually wake another thread up.
|
1.6 |
| 01-Feb-2003 |
nathanw | Arrange to pause for a while if pthread_cond_wait() or pthread_cond_timedwait() is called before any threads have been created and the SA infrastructure is up and running.
Addresses PR lib/20139.
XXX probably need to do this for all of the pthread_*_timedlock() functions, too.
|
1.5 |
| 31-Jan-2003 |
nathanw | Use pthread__sched_sleepers() instead of iterating over sleep queues ourself.
|
1.4 |
| 31-Jan-2003 |
nathanw | Do a similar tuneup on pthread_cond_signal() and pthread_cond_broadcast(): use double-checked locking to avoid pthread__self() and pthread_spinlock() when signaling or broadcasting on a condition variable with no waiters.
|
1.3 |
| 27-Jan-2003 |
nathanw | Add debug counters for mutex and condvar operations.
|
1.2 |
| 18-Jan-2003 |
thorpej | Merge the nathanw_sa branch.
|
1.1 |
| 25-Jul-2001 |
nathanw | branches: 1.1.2; file pthread_cond.c was initially added on branch nathanw_sa.
|
1.1.2.18 |
| 11-Jan-2003 |
skrll | Improve error checking.
OK'd by Nathan.
|
1.1.2.17 |
| 09-Jan-2003 |
thorpej | Remove trailing semicolon from __strong_alias().
|
1.1.2.16 |
| 08-Jan-2003 |
thorpej | Rewrite the way libpthread provides thread primitives to libc, using strong and weak aliases (the way cancelation points are handled).
Work around lame Unix static library semantics which could cause the wrong thread primitives or cancelation point functions to be included in a statically-linked program.
THIS IS AN ABI CHANGE. People running the nathanw_sa branch should ensure that their libc and libpthread are in sync after updating.
|
1.1.2.15 |
| 16-Dec-2002 |
nathanw | Ensure that only one of an alarm callback or a signal/broadcast wakeup can remove a thread from a condition-variable sleep and schedule it.
Don't call pthread__alarm_fired() until after pthread__alarm_del().
|
1.1.2.14 |
| 28-Oct-2002 |
nathanw | A little whitespace cleanup, and use PTQ_INIT() rather than a structure copy to clear the blocked queue in pthread_cond_broadcast().
|
1.1.2.13 |
| 07-Oct-2002 |
nathanw | Put all assigning and testing of ptc_mutex inside #ifdef ERRORCHECK.
|
1.1.2.12 |
| 16-Jul-2002 |
nathanw | Adapt to alarm changes.
|
1.1.2.11 |
| 16-Jul-2002 |
nathanw | Clear the ptc_mutex field in the pthread_cond_wait() callback if the timed_wait was the last waiter.
|
1.1.2.10 |
| 20-May-2002 |
nathanw | Record the sleep object in pthread_cond_timedwait().
Add debug logging (disabled by default).
|
1.1.2.9 |
| 26-Apr-2002 |
nathanw | Track the synchronization object being slept on.
|
1.1.2.8 |
| 11-Apr-2002 |
nathanw | Revert weak aliases.
|
1.1.2.7 |
| 25-Mar-2002 |
nathanw | Provide interfaces to libc.
|
1.1.2.6 |
| 28-Jan-2002 |
nathanw | Implement pthread_cond_timedwait(). Cancellation support.
|
1.1.2.5 |
| 30-Dec-2001 |
nathanw | pt_queue_t -> pthread_queue_t.
|
1.1.2.4 |
| 07-Aug-2001 |
nathanw | Initialize the mutex in the condition variable structure in pthread_cond_init().
|
1.1.2.3 |
| 06-Aug-2001 |
nathanw | broadacst->broadcast (Regression tests can also catch spelling errors!)
|
1.1.2.2 |
| 25-Jul-2001 |
nathanw | Stadardize and clean up use of ERRORCHECK. Implement pthread_{cond,mutex}attr_{init,destroy} and make the relevant functions check for their validity. (No non-default attribute values are supported, but these interfaces are required anyway).
|
1.1.2.1 |
| 25-Jul-2001 |
nathanw | Implement most of condition variables (pthread_cond_timedwait() is not yet done).
|
1.14.2.2 |
| 04-Oct-2004 |
jmc | branches: 1.14.2.2.2; Pullup rev 1.16 (requested by oster in ticket #885)
In cond_wait() and cond_timedwait(), do the ERRORCHECK testing of the waiters list in all cases, not just on cancellation; there are other sources of spurious wakeups, such as single-stepping in the debugger.
|
1.14.2.1 |
| 06-May-2004 |
jmc | Pullup rev 1.15 (requested by kleink in ticket #255)
In the nothread version, don't return EINTR if select() was interrupted since this value is explicitly ruled out by POSIX. Instead, return 0, like a spurious wakeup. PR#24240.
|
1.14.2.2.2.1 |
| 08-Apr-2005 |
tron | Pull up revision 1.17 (requested by nathanw in ticket #1065): Correctly return ETIMEDOUT when the absolute time is in the past, in the nonthreaded case. Fixes, and fix from, PR lib/25961.
|
1.18.12.2 |
| 04-Nov-2007 |
wrstuden | Check in changes to locking behavior.
pthread__sched() now takes a parameter indicating if the run queue is already locked. Useful in cases where we already hold pthread__runqueue_lock.
pthread__suspend() now requires callers explicitly lock pthread__runqueue_lock so we avoid issues with locking order regarding pt_statelock.
Adjsut our lock hierarchy. pthread__runqueue_lock is now above pt_statelock, triggering the above adjustments. Adjust a lot of routines as a result. Also move pt_siglock way up in the hierarchy, making pthread__kill() not violate locking. Add a few extra locks to the list.
Adjust a botch in how pthread_join() used pthread-spintrylock().
pthread_cancel() now correctly walks up the locks with thread->pt_sleeplock. We can't just lock it, as it points to a lock in the top locking rung. So try locking, and if it fails, unlock and re-lock. Add code to cope with the target thread not being in the expected state (which was on a blocked queue) after we get all the locks.
Add comments to describe what's going on in places that I got confused.
Now that pt_statelock is lower in the locking order than pthread__runqueue_lock, we can explicitly lock a thread's state before we take it off the run queue. Adjust sched_yield() accordingly and add some locking calls that were commented out before (as they'd have been locking violations).
pthread_next(): now that we can lock the state lock while holding the run queue lock, do so. Set a thread's state to PT_STATE_RUNNING before we pull it off the run queue. Since we always are going to switch to it, set pt_vpid and pt_lastlwp while setting the state. pthread_next callers now _don't_ set these values.
pthread__kill(): grab pthread__runqueue_lock before target->pt_statelock. If we want to target a thread that is on a blocked queue, do the pthread_spintrylock() dance. Unlock all three locks we're running around with, lock target->pt_sleeplock, then re-lock them all. After we lock, make sure that the thread's still on a blocked queue before proceeding. If it's not, either exit (if we wanted to wake out of sigtimedwait()) or start it all over. If the thread has gone live, it may have blocked our signal and it'd be quite weird to get a signal you'd disabled, just because the signaller had been running before you blocked it.
|
1.18.12.1 |
| 10-Sep-2007 |
wrstuden | Check in first step towards having pthread_kill() kill a thread running on another CPU.
This change adds initial support for deferred signal handling. Just before we go to sleep and while we hold &self->pt_statelock, check to see if we have any deferred signals (blocked signals) pending. These are signals that are not masked in our mask and which have been sent to us. We were running when they came in. Further, since they are being handled this way, there's a signal handler defined for them.
So unlock, run the signal handler(s), then carry on.
For condition variables, we consider this a spurious wakeup, so we just return 0, having not unlocked the mutex. We run the handler with the mutex held. This shouldn't matter, as you aren't supposed to play with mutexes in signal handlers. :-)
For nanosleep(), we just process signals, then go to sleep.
For all other cases, we are in a loop with some external predicate. So we process the signal then roll around the loop to see if it still applies.
In sched_yield(), spin until all deferred signals are gone. Since we hold self->pt_statelock and that lock has to be held before sending a deferred signal, no new deferred signals will come in until we're asleep.
While here, be more careful about locking while changing pt_state to PT_STATE_RUNNING. Grab pt_statelock while doing it, and also set next->pt_vpid to self->pt_vpid holding the same lock. Will make the test to determine how to deliver a signal work right (since a thread's vpid will soon matter in the general case). No longer set next->pt_vpid in pthread__next().
|
1.18.10.1 |
| 16-Sep-2008 |
bouyer | Sync with the following revisions (requested by skrll in ticket #1196): gnu/dist/gdb removed gnu/usr.bin/gdb53 removed distrib/cats/instkernel/Makefile 1.14.6.1 gnu/dist/gdb6/bfd/config.bfd 1.3.6.1 gnu/dist/gdb6/bfd/elfxx-sparc.c 1.1.1.2.6.1 gnu/dist/gdb6/bfd/elfxx-sparc.h 1.1.1.2.6.1 gnu/dist/gdb6/gdb/Makefile.in 1.2.2.1.2.2 gnu/dist/gdb6/gdb/alpha-tdep.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/alpha-tdep.h 1.1.1.2.6.1 gnu/dist/gdb6/gdb/alphabsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/alphabsd-nat.h 1.1.2.1 gnu/dist/gdb6/gdb/alphabsd-tdep.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/alphabsd-tdep.h 1.1.1.2.6.1 gnu/dist/gdb6/gdb/alphanbsd-nat.c 1.1.2.1 gnu/dist/gdb6/gdb/alphanbsd-tdep.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/amd64-nat.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/amd64bsd-nat.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/amd64nbsd-nat.c 1.1.1.2.6.3 gnu/dist/gdb6/gdb/amd64nbsd-tdep.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/arm-tdep.h 1.1.1.2.6.1 gnu/dist/gdb6/gdb/armbsd-tdep.c 1.1.2.1 gnu/dist/gdb6/gdb/armnbsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/armnbsd-tdep.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/configure 1.1.1.2.6.1 gnu/dist/gdb6/gdb/configure.ac 1.1.1.2.6.1 gnu/dist/gdb6/gdb/i386bsd-nat.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/i386nbsd-tdep.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/m68kbsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/mipsnbsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/nbsd-thread.c 1.1.2.3 gnu/dist/gdb6/gdb/ppcnbsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/ppcnbsd-tdep.c 1.3.6.1 gnu/dist/gdb6/gdb/sh-tdep.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/shnbsd-nat.c 1.1.1.2.6.3 gnu/dist/gdb6/gdb/shnbsd-tdep.c 1.1.1.2.6.4 gnu/dist/gdb6/gdb/shnbsd-tdep.h 1.1.1.2.6.1 gnu/dist/gdb6/gdb/sparc-nat.c 1.1.1.2.6.1 gnu/dist/gdb6/gdb/sparc64nbsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/sparcnbsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/tramp-frame.h 1.1.1.2.6.1 gnu/dist/gdb6/gdb/vaxbsd-nat.c 1.1.1.2.6.2 gnu/dist/gdb6/gdb/config/alpha/nbsd.mh 1.1.1.2.6.1 gnu/dist/gdb6/gdb/config/arm/nbsd.mt 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/arm/nbsdelf.mh 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/i386/nbsd64.mh 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/m68k/nbsdelf.mh 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/mips/nbsd.mh 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/powerpc/nbsd.mh 1.1.1.2.6.1 gnu/dist/gdb6/gdb/config/sh/nbsd.mh 1.1.1.1.6.2 gnu/dist/gdb6/gdb/config/sh/tm-nbsd.h 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/sparc/nbsd64.mh 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/sparc/nbsdelf.mh 1.1.1.1.6.1 gnu/dist/gdb6/gdb/config/vax/nbsdelf.mh 1.1.1.1.6.1 gnu/dist/gdb6/opcodes/configure 1.1.1.2.6.1 gnu/dist/gdb6/opcodes/configure.in 1.1.1.2.6.1 gnu/usr.bin/Makefile 1.126.4.1 gnu/usr.bin/gdb6/arch/alpha/config.h 1.3.4.1 gnu/usr.bin/gdb6/arch/alpha/defs.mk 1.2.6.1 gnu/usr.bin/gdb6/arch/alpha/init.c 1.2.6.1 gnu/usr.bin/gdb6/arch/alpha/nm.h 1.2.6.1 gnu/usr.bin/gdb6/arch/arm/defs.mk 1.2.6.2 gnu/usr.bin/gdb6/arch/arm/init.c 1.1.6.1 gnu/usr.bin/gdb6/arch/armeb/config.h 1.1.6.2 gnu/usr.bin/gdb6/arch/armeb/defs.mk 1.1.6.3 gnu/usr.bin/gdb6/arch/armeb/init.c 1.1.6.2 gnu/usr.bin/gdb6/arch/armeb/tm.h 1.1.6.2 gnu/usr.bin/gdb6/arch/armeb/version.c 1.1.6.2 gnu/usr.bin/gdb6/arch/i386/defs.mk 1.4.4.1 gnu/usr.bin/gdb6/arch/i386/init.c 1.3.6.1 gnu/usr.bin/gdb6/arch/m68000/config.h 1.1.6.2 gnu/usr.bin/gdb6/arch/m68000/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/arch/m68000/init.c 1.1.6.2 gnu/usr.bin/gdb6/arch/m68000/tm.h 1.1.6.2 gnu/usr.bin/gdb6/arch/m68000/version.c 1.1.6.2 gnu/usr.bin/gdb6/arch/m68k/defs.mk 1.1.4.1 gnu/usr.bin/gdb6/arch/m68k/init.c 1.1.4.1 gnu/usr.bin/gdb6/arch/mipseb/config.h 1.3.4.1 gnu/usr.bin/gdb6/arch/mipseb/defs.mk 1.2.6.2 gnu/usr.bin/gdb6/arch/mipseb/init.c 1.2.6.2 gnu/usr.bin/gdb6/arch/mipsel/config.h 1.2.6.3 gnu/usr.bin/gdb6/arch/mipsel/defs.mk 1.2.6.3 gnu/usr.bin/gdb6/arch/mipsel/init.c 1.2.6.3 gnu/usr.bin/gdb6/arch/mipsel/tm.h 1.2.6.2 gnu/usr.bin/gdb6/arch/mipsel/version.c 1.2.6.2 gnu/usr.bin/gdb6/arch/powerpc/defs.mk 1.3.6.1 gnu/usr.bin/gdb6/arch/powerpc/init.c 1.3.6.1 gnu/usr.bin/gdb6/arch/sh3eb/config.h 1.2.2.2 gnu/usr.bin/gdb6/arch/sh3eb/defs.mk 1.2.8.3 gnu/usr.bin/gdb6/arch/sh3eb/init.c 1.1.8.3 gnu/usr.bin/gdb6/arch/sh3eb/nm.h 1.1.8.2 gnu/usr.bin/gdb6/arch/sh3eb/tm.h 1.1.8.2 gnu/usr.bin/gdb6/arch/sh3eb/version.c 1.1.8.2 gnu/usr.bin/gdb6/arch/sh3el/config.h 1.2.2.2 gnu/usr.bin/gdb6/arch/sh3el/defs.mk 1.2.8.3 gnu/usr.bin/gdb6/arch/sh3el/init.c 1.1.8.3 gnu/usr.bin/gdb6/arch/sh3el/nm.h 1.1.8.2 gnu/usr.bin/gdb6/arch/sh3el/tm.h 1.1.8.2 gnu/usr.bin/gdb6/arch/sh3el/version.c 1.1.8.2 gnu/usr.bin/gdb6/arch/sparc/defs.mk 1.2.6.1 gnu/usr.bin/gdb6/arch/sparc/init.c 1.1.6.1 gnu/usr.bin/gdb6/arch/sparc64/defs.mk 1.2.6.1 gnu/usr.bin/gdb6/arch/sparc64/init.c 1.1.6.1 gnu/usr.bin/gdb6/arch/vax/config.h 1.1.6.2 gnu/usr.bin/gdb6/arch/vax/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/arch/vax/init.c 1.1.6.2 gnu/usr.bin/gdb6/arch/vax/tm.h 1.1.6.2 gnu/usr.bin/gdb6/arch/vax/version.c 1.1.6.2 gnu/usr.bin/gdb6/arch/x86_64/defs.mk 1.2.6.1 gnu/usr.bin/gdb6/arch/x86_64/init.c 1.1.6.1 gnu/usr.bin/gdb6/bfd/arch/armeb/bfd.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/armeb/bfdver.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/armeb/config.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/armeb/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/m68000/bfd.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/m68000/bfdver.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/m68000/config.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/m68000/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/mipsel/bfd.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/mipsel/bfdver.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/mipsel/config.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/mipsel/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfd.h 1.1.8.3 gnu/usr.bin/gdb6/bfd/arch/sh3eb/bfdver.h 1.1.8.2 gnu/usr.bin/gdb6/bfd/arch/sh3eb/config.h 1.1.8.2 gnu/usr.bin/gdb6/bfd/arch/sh3eb/defs.mk 1.1.8.3 gnu/usr.bin/gdb6/bfd/arch/sh3el/bfd.h 1.1.8.3 gnu/usr.bin/gdb6/bfd/arch/sh3el/bfdver.h 1.1.8.2 gnu/usr.bin/gdb6/bfd/arch/sh3el/config.h 1.1.8.2 gnu/usr.bin/gdb6/bfd/arch/sh3el/defs.mk 1.1.8.3 gnu/usr.bin/gdb6/bfd/arch/vax/bfd.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/vax/bfdver.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/vax/config.h 1.1.6.2 gnu/usr.bin/gdb6/bfd/arch/vax/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/gdb/Makefile 1.5.2.1.2.2 gnu/usr.bin/gdb6/gdbtui/Makefile 1.2.6.1 gnu/usr.bin/gdb6/libiberty/arch/armeb/config.h 1.1.6.2 gnu/usr.bin/gdb6/libiberty/arch/armeb/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/libiberty/arch/m68000/config.h 1.1.6.2 gnu/usr.bin/gdb6/libiberty/arch/m68000/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/libiberty/arch/mipsel/config.h 1.1.6.2 gnu/usr.bin/gdb6/libiberty/arch/mipsel/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/libiberty/arch/sh3eb/config.h 1.1.8.2 gnu/usr.bin/gdb6/libiberty/arch/sh3eb/defs.mk 1.1.8.2 gnu/usr.bin/gdb6/libiberty/arch/sh3el/config.h 1.1.8.2 gnu/usr.bin/gdb6/libiberty/arch/sh3el/defs.mk 1.1.8.2 gnu/usr.bin/gdb6/libiberty/arch/vax/config.h 1.1.6.2 gnu/usr.bin/gdb6/libiberty/arch/vax/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/armeb/config.h 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/armeb/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/m68000/config.h 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/m68000/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/mipsel/config.h 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/mipsel/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/sh3eb/config.h 1.1.8.2 gnu/usr.bin/gdb6/opcodes/arch/sh3eb/defs.mk 1.1.8.3 gnu/usr.bin/gdb6/opcodes/arch/sh3el/config.h 1.1.8.2 gnu/usr.bin/gdb6/opcodes/arch/sh3el/defs.mk 1.1.8.3 gnu/usr.bin/gdb6/opcodes/arch/vax/config.h 1.1.6.2 gnu/usr.bin/gdb6/opcodes/arch/vax/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/armeb/config.h 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/armeb/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/m68000/config.h 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/m68000/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/mipsel/config.h 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/mipsel/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/sh3eb/config.h 1.1.8.2 gnu/usr.bin/gdb6/readline/arch/sh3eb/defs.mk 1.1.8.2 gnu/usr.bin/gdb6/readline/arch/sh3el/config.h 1.1.8.2 gnu/usr.bin/gdb6/readline/arch/sh3el/defs.mk 1.1.8.2 gnu/usr.bin/gdb6/readline/arch/vax/config.h 1.1.6.2 gnu/usr.bin/gdb6/readline/arch/vax/defs.mk 1.1.6.2 gnu/usr.bin/gdb6/sim/arch/mipseb/cconfig.h 1.1.2.1 gnu/usr.bin/gdb6/sim/arch/mipseb/config.h 1.1.2.1 gnu/usr.bin/gdb6/sim/arch/mipseb/defs.mk 1.1.2.1 gnu/usr.bin/gdb6/sim/arch/mipsel/cconfig.h 1.1.2.1 gnu/usr.bin/gdb6/sim/arch/mipsel/config.h 1.1.2.1 gnu/usr.bin/gdb6/sim/arch/mipsel/defs.mk 1.1.2.1 lib/libkvm/kvm_sparc64.c 1.10.18.2 lib/libpthread/pthread.c 1.48.6.4 lib/libpthread/pthread_barrier.c 1.6.18.1 lib/libpthread/pthread_cond.c 1.18.12.2 lib/libpthread/pthread_debug.h 1.8.18.1 lib/libpthread/pthread_int.h 1.34.4.5 lib/libpthread/pthread_lock.c 1.14.6.1 lib/libpthread/pthread_mutex.c 1.22.4.2 lib/libpthread/pthread_run.c 1.18.12.4 lib/libpthread/pthread_rwlock.c 1.13.6.2 lib/libpthread/pthread_sa.c 1.37.6.5 lib/libpthread/pthread_sig.c 1.47.4.8 lib/libpthread/pthread_sleep.c 1.7.6.2 lib/libpthread/sem.c 1.9.6.2 lib/libpthread/arch/sh3/pthread_md.h 1.3.6.1 regress/lib/libpthread/resolv/Makefile 1.1.12.1 regress/lib/libpthread/sigrunning/Makefile 1.1.2.1 regress/lib/libpthread/sigrunning/sigrunning.c 1.1.2.1 share/mk/bsd.own.mk 1.489.4.3 sys/arch/amd64/amd64/locore.S 1.18.14.1 sys/arch/amd64/amd64/machdep.c 1.44.2.3.2.1 sys/arch/amd64/conf/kern.ldscript 1.1.70.1 sys/arch/cats/conf/Makefile.cats.inc 1.17.30.1 sys/arch/shark/conf/Makefile.shark.inc 1.6.30.1 sys/arch/sparc64/conf/kern.ldscript 1.7.26.2 sys/arch/sparc64/conf/kern32.ldscript 1.6.26.2 sys/arch/sparc64/include/kcore.h 1.4.92.2 sys/arch/sparc64/sparc64/locore.s 1.232.4.4 sys/arch/sparc64/sparc64/machdep.c 1.193.4.3 sys/arch/sparc64/sparc64/pmap.c 1.184.2.1.2.4 sys/conf/newvers.sh 1.42.26.2 sys/kern/kern_sa.c 1.87.4.11 sys/kern/kern_synch.c 1.173.4.2 sys/sys/savar.h 1.20.10.2 tools/gdb/Makefile 1.9.4.1 tools/gdb/mknative-gdb 1.1.6.1
pullup the wrstuden-fixsa CVS branch to netbsd-4: toolchain/35540 - GDB 6 support for pthreads. port-sparc64/37534 - ktrace firefox gives kernel trap 30: data access expection GDB changes: - delete gdb53 - enable gdb6 on all architectures - add support for amd64 crash dumps - add support for sparc64 crash dumps - add support for /proc pid to executable filename for all archs - enable thread support for all architectures - add a note section to kernels to all platforms - support detection/unwinding of signals for most architectures. - Fix PTHREAD_UCONTEXT_TO_REG / PTHREAD_REG_TO_UCONTEXT on sh3. - Apply fix from binutils-current so that sparc gdb can be cross built on a 64bit host. SA/pthread changes: Pre-allocate memory needed for event delivery. Eliminates dropped interrupts under load. Deliver intra-process signals to running threads Eliminate some deadlock scenarios Fix intra-process signal delivery when delivering to a thread waiting for signals. Makes afs work again!
|
1.31.2.5 |
| 10-Sep-2007 |
skrll | Reduce diff to HEAD.
|
1.31.2.4 |
| 10-Sep-2007 |
skrll | Sync with HEAD.
|
1.31.2.3 |
| 03-Sep-2007 |
skrll | Sync with HEAD.
|
1.31.2.2 |
| 15-Aug-2007 |
skrll | Sync with HEAD.
|
1.31.2.1 |
| 18-Jul-2007 |
skrll | Initial work on provided correctly aligned __cpu_simple_lock_t for hppa and first attempt at adapting i386 to the changes.
More to come.
|
1.32.2.2 |
| 04-Aug-2007 |
ad | Some significant performance improvements, and a fix for a race with pthread detach/join.
- Make mutex acquire spin for a short time, as done with spinlocks. - Make the number of spins controllable with the env var PTHREAD_NSPINS. - Reduce the amount of time that libpthread internal spinlocks are held. - Rely more on the barrier effects of park/unpark to avoid taking spinlocks. - Simplify the locking around pthreads and the global queues. - Align per-thread sync data on a 128 byte boundary. - Offset thread stacks by a small amount to try and reduce cache thrash.
|
1.32.2.1 |
| 04-Aug-2007 |
ad | file pthread_cond.c was added on branch matt-mips64 on 2007-08-04 13:37:50 +0000
|
1.34.2.3 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.34.2.2 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.34.2.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.41.4.2 |
| 04-Jun-2008 |
yamt | sync with head
|
1.41.4.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.42.2.2 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.42.2.1 |
| 23-Jun-2008 |
wrstuden | Sync w/ -current. 34 merge conflicts to follow.
|
1.53.4.2 |
| 25-Oct-2008 |
yamt | remove ; after __weak_alias()
|
1.53.4.1 |
| 25-Oct-2008 |
yamt | file pthread_cond.c was added on branch christos-time_t on 2008-10-25 14:14:12 +0000
|
1.53.2.1 |
| 20-Feb-2014 |
sborrill | Pull up the following revisions(s) (requested by prlw1 in ticket #1898): lib/libpthread/pthread_cond.c: revision 1.62 lib/libpthread/pthread_mutex.c: revision 1.57,1.59
Partial fix for thread deadlock commonly observed with named. Also address PR/44756.
|
1.56.8.4 |
| 20-Feb-2014 |
sborrill | Pull up the following revisions(s) (requested by prlw1 in ticket #1029): lib/libpthread/pthread_cond.c: revision 1.62 lib/libpthread/pthread_mutex.c: revision 1.57,1.59
Partial fix for thread deadlock commonly observed with named. Also address PR/44756.
|
1.56.8.3 |
| 29-Apr-2013 |
riz | Pull up following revision(s) (requested by manu in ticket #869): lib/libpthread/pthread_rwlock.c: revision 1.33 lib/libc/include/reentrant.h: revision 1.16 lib/libpthread/pthread_cond.c: revision 1.59 lib/libpthread/pthread_misc.c: revision 1.15 lib/libc/thread-stub/thread-stub.c: revision 1.23 lib/libpthread/pthread_cancelstub.c: revision 1.38 lib/libpthread/pthread_specific.c: revision 1.26 lib/libpthread/pthread_mutex.c: revision 1.56 lib/libpthread/pthread_tsd.c: revision 1.11 lib/libpthread/Makefile: revision 1.80 lib/libpthread/pthread.c: revision 1.143 lib/libpthread/pthread_int.h: revision 1.89 - Allow libpthread to be dlopened again, by providing libc stubs to libpthread. - Fail if the dlopened libpthread does pthread_create(). From manu@ - Discussed at length in the mailing lists; approved by core@ - This was chosen as the least intrusive patch that will provide the necessary functionality. XXX: pullup to 6
|
1.56.8.2 |
| 20-Apr-2013 |
bouyer | Pull up following revision(s) (requested by christos in ticket #862): lib/libpthread/pthread_cond.c: revision 1.60 lib/libpthread/pthread_cond.c: revision 1.61 PR/47703: Yasushi Oshima: pthread_cond_timedwait() does not wait after call pthread_condattr_setclock(CLOCK_MONOTONIC) _lwp_park(2) expects a realtime clock, and it gets passed a monotonic one. Since monotonic < real, it never sleeps. This patch adjusts the monotonic clock to be a real one before it passes is to _lwp_park(2). This is the minimal hacky fix and it will be fixed properly in _lwp_park(2) in the future. XXX: pullup to 6. for safety, declare mono on the outermost block it is used.
|
1.56.8.1 |
| 28-Nov-2012 |
riz | Pull up following revision(s) (requested by christos in ticket #722): lib/libpthread/pthread_cond.c: revision 1.58 lib/libpthread/pthread_condattr.3: revision 1.8 lib/libpthread/pthread.h: revision 1.35 add pthread_condattr_setclock(3)
|
1.56.6.3 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.56.6.2 |
| 16-Jan-2013 |
yamt | sync with (a bit old) head
|
1.56.6.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.57.2.3 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.57.2.2 |
| 23-Jun-2013 |
tls | resync from head
|
1.57.2.1 |
| 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
1.65.6.1 |
| 26-Jan-2020 |
martin | Pull up following revision(s) (requested by ad in ticket #647):
lib/libpthread/pthread_rwlock.c: revision 1.37 (patch) lib/libpthread/pthread_misc.c: revision 1.16 lib/libpthread/pthread.c: revision 1.154 lib/libpthread/pthread_int.h: revision 1.98 lib/libpthread/pthread_cond.c: revision 1.66 lib/libpthread/pthread_mutex.c: revision 1.66
Rip out some very ambitious optimisations around pthread_mutex that are don't buy much. This stuff is hard enough to get right in the kernel let alone userspace, and I don't trust that it's right.
|
1.65.4.2 |
| 21-Apr-2020 |
martin | Sync with HEAD
|
1.65.4.1 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.77.4.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|