Skip to content

Commit

Permalink
Merge pull request #2626 from rgrr/dcd_nrf5x-fix-race-condition
Browse files Browse the repository at this point in the history
dcd_nrf5x: fix race condition
  • Loading branch information
hathach authored May 15, 2024
2 parents cf532d1 + 9d56141 commit 5393f8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/portable/nordic/nrf5x/dcd_nrf5x.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static void start_dma(volatile uint32_t* reg_startep) {

static void edpt_dma_start(volatile uint32_t* reg_startep) {
if (atomic_flag_test_and_set(&_dcd.dma_running)) {
usbd_defer_func((osal_task_func_t)(uintptr_t ) edpt_dma_start, (void*) (uintptr_t) reg_startep, true);
usbd_defer_func((osal_task_func_t)(uintptr_t ) edpt_dma_start, (void*) (uintptr_t) reg_startep, is_in_isr());
} else {
start_dma(reg_startep);
}
Expand Down

0 comments on commit 5393f8d

Please sign in to comment.