Update to FreeBSD head 2016-12-10

Git mirror commit 80c55f08a05ab3b26a73b226ccb56adc3122a55c.
This commit is contained in:
Sebastian Huber
2016-12-09 14:19:03 +01:00
parent c4e89a9125
commit 75b706fde4
227 changed files with 3800 additions and 3006 deletions

View File

@@ -434,7 +434,7 @@ sleepq_set_timeout_sbt(void *wchan, sbintime_t sbt, sbintime_t pr,
MPASS(TD_ON_SLEEPQ(td));
MPASS(td->td_sleepqueue == NULL);
MPASS(wchan != NULL);
if (cold)
if (cold && td == &thread0)
panic("timed sleep before timers are working");
KASSERT(td->td_sleeptimo == 0, ("td %d %p td_sleeptimo %jx",
td->td_tid, td, (uintmax_t)td->td_sleeptimo));
@@ -1089,9 +1089,9 @@ sleepq_signal(void *wchan, int flags, int pri, int queue)
* been sleeping the longest since threads are always added to
* the tail of sleep queues.
*/
besttd = NULL;
besttd = TAILQ_FIRST(&sq->sq_blocked[queue]);
TAILQ_FOREACH(td, &sq->sq_blocked[queue], td_slpq) {
if (besttd == NULL || td->td_priority < besttd->td_priority)
if (td->td_priority < besttd->td_priority)
besttd = td;
}
#else /* __rtems__ */