summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/usb_process.c')
-rw-r--r--sys/dev/usb/usb_process.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/dev/usb/usb_process.c b/sys/dev/usb/usb_process.c
index 7493e39..e70166c 100644
--- a/sys/dev/usb/usb_process.c
+++ b/sys/dev/usb/usb_process.c
@@ -501,3 +501,15 @@ usb_proc_rewakeup(struct usb_process *up)
cv_signal(&up->up_cv);
}
}
+
+/*------------------------------------------------------------------------*
+ * usb_proc_is_called_from
+ *
+ * This function will return non-zero if called from inside the USB
+ * process passed as first argument. Else this function returns zero.
+ *------------------------------------------------------------------------*/
+int
+usb_proc_is_called_from(struct usb_process *up)
+{
+ return (up->up_curtd == curthread);
+}
OpenPOWER on IntegriCloud