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

@@ -121,7 +121,7 @@ usb_process(void *arg)
thread_unlock(td);
#endif /* __rtems__ */
mtx_lock(up->up_mtx);
USB_MTX_LOCK(up->up_mtx);
up->up_curtd = td;
@@ -190,7 +190,7 @@ usb_process(void *arg)
continue;
}
/* end if messages - check if anyone is waiting for sync */
/* end of messages - check if anyone is waiting for sync */
if (up->up_dsleep) {
up->up_dsleep = 0;
cv_broadcast(&up->up_drain);
@@ -201,7 +201,7 @@ usb_process(void *arg)
up->up_ptr = NULL;
cv_signal(&up->up_cv);
mtx_unlock(up->up_mtx);
USB_MTX_UNLOCK(up->up_mtx);
#if (__FreeBSD_version >= 800000)
/* Clear the proc pointer if this is the last thread. */
if (--usb_pcount == 0)
@@ -297,11 +297,12 @@ usb_proc_msignal(struct usb_process *up, void *_pm0, void *_pm1)
usb_size_t d;
uint8_t t;
/* check if gone, return dummy value */
if (up->up_gone)
/* check if gone or in polling mode, return dummy value */
if (up->up_gone != 0 ||
USB_IN_POLLING_MODE_FUNC() != 0)
return (_pm0);
mtx_assert(up->up_mtx, MA_OWNED);
USB_MTX_ASSERT(up->up_mtx, MA_OWNED);
t = 0;
@@ -382,7 +383,7 @@ usb_proc_is_gone(struct usb_process *up)
* structure is initialised.
*/
if (up->up_mtx != NULL)
mtx_assert(up->up_mtx, MA_OWNED);
USB_MTX_ASSERT(up->up_mtx, MA_OWNED);
return (0);
}
@@ -403,7 +404,7 @@ usb_proc_mwait(struct usb_process *up, void *_pm0, void *_pm1)
if (up->up_gone)
return;
mtx_assert(up->up_mtx, MA_OWNED);
USB_MTX_ASSERT(up->up_mtx, MA_OWNED);
if (up->up_curtd == curthread) {
/* Just remove the messages from the queue. */
@@ -443,9 +444,9 @@ usb_proc_drain(struct usb_process *up)
return;
/* handle special case with Giant */
if (up->up_mtx != &Giant)
mtx_assert(up->up_mtx, MA_NOTOWNED);
USB_MTX_ASSERT(up->up_mtx, MA_NOTOWNED);
mtx_lock(up->up_mtx);
USB_MTX_LOCK(up->up_mtx);
/* Set the gone flag */
@@ -482,7 +483,7 @@ usb_proc_drain(struct usb_process *up)
DPRINTF("WARNING: Someone is waiting "
"for USB process drain!\n");
}
mtx_unlock(up->up_mtx);
USB_MTX_UNLOCK(up->up_mtx);
}
/*------------------------------------------------------------------------*
@@ -503,7 +504,7 @@ usb_proc_rewakeup(struct usb_process *up)
if (up->up_gone)
return;
mtx_assert(up->up_mtx, MA_OWNED);
USB_MTX_ASSERT(up->up_mtx, MA_OWNED);
if (up->up_msleep == 0) {
/* re-wakeup */