Skip to content

Commit

Permalink
bugfix: ringbuffer return item api
Browse files Browse the repository at this point in the history
Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR
  • Loading branch information
costaud committed Nov 24, 2016
1 parent 137c027 commit 6d502ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/freertos/ringbuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,9 @@ void *xRingbufferReceiveUpToFromISR(RingbufHandle_t ringbuf, size_t *item_size,
void vRingbufferReturnItem(RingbufHandle_t ringbuf, void *item)
{
ringbuf_t *rb=(ringbuf_t *)ringbuf;
portENTER_CRITICAL_ISR(&rb->mux);
portENTER_CRITICAL(&rb->mux);
rb->returnItemToRingbufImpl(rb, item);
portEXIT_CRITICAL_ISR(&rb->mux);
portEXIT_CRITICAL(&rb->mux);
xSemaphoreGive(rb->free_space_sem);
}

Expand Down

0 comments on commit 6d502ce

Please sign in to comment.