Skip to content

Commit

Permalink
Merge branch 'bugfix/btdm_task_yield' into 'master'
Browse files Browse the repository at this point in the history
component/bt : fix bug of task schedule delayed.

See merge request !828
  • Loading branch information
jack0c committed Jun 7, 2017
2 parents 99d5959 + bd30973 commit 058eb26
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions components/bt/bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct osi_funcs_t {
void (*_interrupt_disable)(void);
void (*_interrupt_restore)(void);
void (*_task_yield)(void);
void (*_task_yield_from_isr)(void);
void *(*_semphr_create)(uint32_t max, uint32_t init);
int32_t (*_semphr_give_from_isr)(void *semphr, void *hptw);
int32_t (*_semphr_take)(void *semphr, uint32_t block_time_ms);
Expand Down Expand Up @@ -104,6 +105,11 @@ static void IRAM_ATTR interrupt_restore(void)
portEXIT_CRITICAL(&global_int_mux);
}

static void IRAM_ATTR task_yield_from_isr(void)
{
portYIELD_FROM_ISR();
}

static void *IRAM_ATTR semphr_create_wrapper(uint32_t max, uint32_t init)
{
return (void *)xSemaphoreCreateCounting(max, init);
Expand Down Expand Up @@ -155,6 +161,7 @@ static struct osi_funcs_t osi_funcs = {
._interrupt_disable = interrupt_disable,
._interrupt_restore = interrupt_restore,
._task_yield = vPortYield,
._task_yield_from_isr = task_yield_from_isr,
._semphr_create = semphr_create_wrapper,
._semphr_give_from_isr = semphr_give_from_isr_wrapper,
._semphr_take = semphr_take_wrapper,
Expand Down
2 changes: 1 addition & 1 deletion components/bt/lib
Submodule lib updated 1 files
+ libbtdm_app.a

0 comments on commit 058eb26

Please sign in to comment.