From f701d09fb00038923a601ba7a8847feb216efa9b Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 20 Aug 2012 07:52:45 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4589 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/OTGv1/usb_lld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index 9d899fd68..2653698fd 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -617,13 +617,13 @@ static void usb_lld_serve_interrupt(USBDriver *usbp) { be triggered again.*/ otgp->GINTMSK &= ~GINTMSK_RXFLVLM; /* Checks if the thread is waiting for an event.*/ + chSysLockFromIsr(); if (usbp->thd_wait != NULL) { /* The thread is made ready, it will be scheduled on ISR exit.*/ - chSysLockFromIsr(); chThdResumeI(usbp->thd_wait); usbp->thd_wait = NULL; - chSysUnlockFromIsr(); } + chSysUnlockFromIsr(); } /* IN/OUT endpoints event handling.*/ -- cgit v1.2.3