Skip to content

Commit 9bbcd1a

Browse files
authored
Merge pull request #5284 from mysterywolf/mutex
[mutex] use RT_IPC_FLAG_PRIO to replace RT_IPC_FLAG_FIFO
2 parents a087a1b + df9a23c commit 9bbcd1a

File tree

48 files changed

+55
-55
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+55
-55
lines changed

bsp/at32/Libraries/rt_drivers/drv_sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ struct rt_mmcsd_host *sdio_host_create(struct at32_sdio_des *sdio_des)
648648
sdio->sdio_des.clk_get = (sdio_des->clk_get == RT_NULL ? at32_sdio_clk_get : sdio_des->clk_get);
649649

650650
rt_event_init(&sdio->event, "sdio", RT_IPC_FLAG_FIFO);
651-
rt_mutex_init(&sdio->mutex, "sdio", RT_IPC_FLAG_FIFO);
651+
rt_mutex_init(&sdio->mutex, "sdio", RT_IPC_FLAG_PRIO);
652652

653653
/* set host defautl attributes */
654654
host->ops = &ops;

bsp/bluetrum/ab32vg1-ab-prougen/board/board.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ RT_SECTION(".irq.cache")
149149
void cache_init(void)
150150
{
151151
os_cache_init();
152-
rt_mutex_init(&mutex_spiflash, "flash_mutex", RT_IPC_FLAG_FIFO);
153-
rt_mutex_init(&mutex_cache, "cache_mutex", RT_IPC_FLAG_FIFO);
152+
rt_mutex_init(&mutex_spiflash, "flash_mutex", RT_IPC_FLAG_PRIO);
153+
rt_mutex_init(&mutex_cache, "cache_mutex", RT_IPC_FLAG_PRIO);
154154
}
155155

156156
RT_SECTION(".irq.cache")

bsp/bluetrum/libraries/hal_drivers/drv_sdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ struct rt_mmcsd_host *sdio_host_create(struct ab32_sdio_des *sdio_des)
570570
sdio->sdio_des.clk_get = (sdio_des->clk_get == RT_NULL ? ab32_sdio_clk_get : sdio_des->clk_get);
571571

572572
rt_event_init(&sdio->event, "sdio", RT_IPC_FLAG_FIFO);
573-
rt_mutex_init(&sdio->mutex, "sdio", RT_IPC_FLAG_FIFO);
573+
rt_mutex_init(&sdio->mutex, "sdio", RT_IPC_FLAG_PRIO);
574574

575575
/* set host defautl attributes */
576576
host->ops = &ab32_sdio_ops;

bsp/ft2004/drivers/drv_sdctrl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static rt_err_t rthw_sdctrl_create(ft_sdctrl_class_t *class_p)
560560

561561
class_p->ft_sdctrl.config = *(FSdCtrl_Config_t *)FSdCtrl_LookupConfig(0);
562562
rt_event_init(&class_p->event, "sdctrl", RT_IPC_FLAG_FIFO);
563-
rt_mutex_init(&class_p->mutex, "sdctrl", RT_IPC_FLAG_FIFO);
563+
rt_mutex_init(&class_p->mutex, "sdctrl", RT_IPC_FLAG_PRIO);
564564

565565
class_p->host = host;
566566
host->ops = &ops;

bsp/k210/driver/dmalock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static struct dmac_host _dmac_host;
3030
void dmalock_init(void)
3131
{
3232
rt_sem_init(&_dmac_host.sem, "dma_sem", DMAC_CHANNEL_COUNT, RT_IPC_FLAG_FIFO);
33-
rt_mutex_init(&_dmac_host.mutex, "dma_mutex", RT_IPC_FLAG_FIFO);
33+
rt_mutex_init(&_dmac_host.mutex, "dma_mutex", RT_IPC_FLAG_PRIO);
3434
for (int i = 0; i < DMAC_CHANNEL_COUNT; i++)
3535
{
3636
_dmac_host.channel_used[i] = 0;

bsp/lpc54608-LPCXpresso/drivers/drv_sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ rt_err_t mci_hw_init(const char *device_name)
412412
}
413413

414414
/* initialize mutex lock */
415-
rt_mutex_init(&_mci_device->lock, device_name, RT_IPC_FLAG_FIFO);
415+
rt_mutex_init(&_mci_device->lock, device_name, RT_IPC_FLAG_PRIO);
416416
/* create finish event */
417417
_mci_device->finish_event = rt_event_create(device_name, RT_IPC_FLAG_FIFO);
418418

bsp/lpc55sxx/Libraries/drivers/drv_sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ int rt_hw_mci_init(void)
232232
}
233233

234234
/* initialize mutex lock */
235-
rt_mutex_init(&_mci_device->lock, "sdcard0", RT_IPC_FLAG_FIFO);
235+
rt_mutex_init(&_mci_device->lock, "sdcard0", RT_IPC_FLAG_PRIO);
236236
/* create finish event */
237237
_mci_device->finish_event = rt_event_create("sdcard0", RT_IPC_FLAG_FIFO);
238238

bsp/simulator/drivers/sd_sim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ rt_err_t rt_hw_sdcard_init(const char *spi_device_name)
140140
sd = &_sdcard;
141141
device = &(sd->parent);
142142

143-
lock = rt_mutex_create("lock", RT_IPC_FLAG_FIFO);
143+
lock = rt_mutex_create("lock", RT_IPC_FLAG_PRIO);
144144
if (lock == RT_NULL)
145145
{
146146
LOG_E("Create mutex in rt_hw_sdcard_init failed!");

bsp/simulator/drivers/sdl_fb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static void sdlfb_hw_init(void)
220220

221221
rt_device_register(RT_DEVICE(&_device), "sdl", RT_DEVICE_FLAG_RDWR);
222222

223-
sdllock = rt_mutex_create("fb", RT_IPC_FLAG_FIFO);
223+
sdllock = rt_mutex_create("fb", RT_IPC_FLAG_PRIO);
224224
if (sdllock == RT_NULL)
225225
{
226226
LOG_E("Create mutex for sdlfb failed!");

bsp/simulator/drivers/sst25vfxx_mtd_sim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ rt_err_t sst25vfxx_mtd_init(const char *nor_name,
171171
mtd->ops = &sst25vfxx_mtd_ops;
172172

173173
/* initialize mutex */
174-
if (rt_mutex_init(&flash_lock, nor_name, RT_IPC_FLAG_FIFO) != RT_EOK)
174+
if (rt_mutex_init(&flash_lock, nor_name, RT_IPC_FLAG_PRIO) != RT_EOK)
175175
{
176176
rt_kprintf("init sd lock mutex failed\n");
177177
}

0 commit comments

Comments
 (0)