Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_46254178
rt-thread
提交
df9a23c5
R
rt-thread
项目概览
weixin_46254178
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
df9a23c5
编写于
11月 17, 2021
作者:
mysterywolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[mutex] use RT_IPC_FLAG_PRIO to replace RT_IPC_FLAG_FIFO
上级
fbca0c7f
变更
48
显示空白变更内容
内联
并排
Showing
48 changed file
with
55 addition
and
55 deletion
+55
-55
bsp/at32/Libraries/rt_drivers/drv_sdio.c
bsp/at32/Libraries/rt_drivers/drv_sdio.c
+1
-1
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
+2
-2
bsp/bluetrum/libraries/hal_drivers/drv_sdio.c
bsp/bluetrum/libraries/hal_drivers/drv_sdio.c
+1
-1
bsp/ft2004/drivers/drv_sdctrl.c
bsp/ft2004/drivers/drv_sdctrl.c
+1
-1
bsp/k210/driver/dmalock.c
bsp/k210/driver/dmalock.c
+1
-1
bsp/lpc54608-LPCXpresso/drivers/drv_sd.c
bsp/lpc54608-LPCXpresso/drivers/drv_sd.c
+1
-1
bsp/lpc55sxx/Libraries/drivers/drv_sd.c
bsp/lpc55sxx/Libraries/drivers/drv_sd.c
+1
-1
bsp/simulator/drivers/sd_sim.c
bsp/simulator/drivers/sd_sim.c
+1
-1
bsp/simulator/drivers/sdl_fb.c
bsp/simulator/drivers/sdl_fb.c
+1
-1
bsp/simulator/drivers/sst25vfxx_mtd_sim.c
bsp/simulator/drivers/sst25vfxx_mtd_sim.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_crypto.c
bsp/stm32/libraries/HAL_Drivers/drv_crypto.c
+1
-1
bsp/stm32/libraries/HAL_Drivers/drv_sdio.c
bsp/stm32/libraries/HAL_Drivers/drv_sdio.c
+1
-1
bsp/stm32/stm32h750-artpi-h750/board/port/drv_sdio.c
bsp/stm32/stm32h750-artpi-h750/board/port/drv_sdio.c
+1
-1
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_sdio.c
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_sdio.c
+2
-2
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_emmc.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_emmc.c
+1
-1
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_nand.c
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_nand.c
+1
-1
bsp/swm320-lq100/drivers/drv_crypto.c
bsp/swm320-lq100/drivers/drv_crypto.c
+1
-1
bsp/swm320-lq100/drivers/drv_nor_flash.c
bsp/swm320-lq100/drivers/drv_nor_flash.c
+1
-1
bsp/swm320-lq100/drivers/drv_sdio.c
bsp/swm320-lq100/drivers/drv_sdio.c
+1
-1
bsp/swm320/drivers/drv_crypto.c
bsp/swm320/drivers/drv_crypto.c
+1
-1
bsp/swm320/drivers/drv_nor_flash.c
bsp/swm320/drivers/drv_nor_flash.c
+1
-1
bsp/swm320/drivers/drv_sdio.c
bsp/swm320/drivers/drv_sdio.c
+1
-1
bsp/w60x/drivers/drv_crypto.c
bsp/w60x/drivers/drv_crypto.c
+1
-1
bsp/x86/drivers/floppy.c
bsp/x86/drivers/floppy.c
+1
-1
bsp/zynqmp-r5-axu4ev/drivers/drv_sdcard.c
bsp/zynqmp-r5-axu4ev/drivers/drv_sdcard.c
+1
-1
components/cplusplus/cxx_Mutex.cpp
components/cplusplus/cxx_Mutex.cpp
+1
-1
components/dfs/filesystems/elmfat/dfs_elm.c
components/dfs/filesystems/elmfat/dfs_elm.c
+1
-1
components/dfs/src/dfs.c
components/dfs/src/dfs.c
+1
-1
components/drivers/i2c/i2c_core.c
components/drivers/i2c/i2c_core.c
+1
-1
components/drivers/rtc/alarm.c
components/drivers/rtc/alarm.c
+1
-1
components/drivers/sdio/mmcsd_core.c
components/drivers/sdio/mmcsd_core.c
+1
-1
components/drivers/sensors/sensor.c
components/drivers/sensors/sensor.c
+1
-1
components/drivers/spi/enc28j60.c
components/drivers/spi/enc28j60.c
+1
-1
components/drivers/spi/spi_core.c
components/drivers/spi/spi_core.c
+1
-1
components/drivers/spi/spi_flash_sfud.c
components/drivers/spi/spi_flash_sfud.c
+1
-1
components/drivers/src/pipe.c
components/drivers/src/pipe.c
+1
-1
components/drivers/wlan/wlan_cfg.c
components/drivers/wlan/wlan_cfg.c
+1
-1
components/drivers/wlan/wlan_dev.c
components/drivers/wlan/wlan_dev.c
+1
-1
components/drivers/wlan/wlan_mgnt.c
components/drivers/wlan/wlan_mgnt.c
+4
-4
components/libc/posix/pthreads/pthread_mutex.c
components/libc/posix/pthreads/pthread_mutex.c
+1
-1
components/net/at/at_socket/at_socket.c
components/net/at/at_socket/at_socket.c
+2
-2
components/net/at/src/at_client.c
components/net/at/src/at_client.c
+1
-1
components/net/lwip-1.4.1/src/arch/sys_arch.c
components/net/lwip-1.4.1/src/arch/sys_arch.c
+1
-1
components/net/lwip-2.0.2/src/arch/sys_arch.c
components/net/lwip-2.0.2/src/arch/sys_arch.c
+1
-1
components/net/lwip-2.0.3/src/arch/sys_arch.c
components/net/lwip-2.0.3/src/arch/sys_arch.c
+1
-1
components/net/lwip-2.1.2/src/arch/sys_arch.c
components/net/lwip-2.1.2/src/arch/sys_arch.c
+1
-1
components/net/sal_socket/src/sal_socket.c
components/net/sal_socket/src/sal_socket.c
+1
-1
examples/utest/testcases/kernel/mutex_tc.c
examples/utest/testcases/kernel/mutex_tc.c
+2
-2
未找到文件。
bsp/at32/Libraries/rt_drivers/drv_sdio.c
浏览文件 @
df9a23c5
...
@@ -648,7 +648,7 @@ struct rt_mmcsd_host *sdio_host_create(struct at32_sdio_des *sdio_des)
...
@@ -648,7 +648,7 @@ struct rt_mmcsd_host *sdio_host_create(struct at32_sdio_des *sdio_des)
sdio
->
sdio_des
.
clk_get
=
(
sdio_des
->
clk_get
==
RT_NULL
?
at32_sdio_clk_get
:
sdio_des
->
clk_get
);
sdio
->
sdio_des
.
clk_get
=
(
sdio_des
->
clk_get
==
RT_NULL
?
at32_sdio_clk_get
:
sdio_des
->
clk_get
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
PRI
O
);
/* set host defautl attributes */
/* set host defautl attributes */
host
->
ops
=
&
ops
;
host
->
ops
=
&
ops
;
...
...
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
浏览文件 @
df9a23c5
...
@@ -149,8 +149,8 @@ RT_SECTION(".irq.cache")
...
@@ -149,8 +149,8 @@ RT_SECTION(".irq.cache")
void
cache_init
(
void
)
void
cache_init
(
void
)
{
{
os_cache_init
();
os_cache_init
();
rt_mutex_init
(
&
mutex_spiflash
,
"flash_mutex"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
mutex_spiflash
,
"flash_mutex"
,
RT_IPC_FLAG_
PRI
O
);
rt_mutex_init
(
&
mutex_cache
,
"cache_mutex"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
mutex_cache
,
"cache_mutex"
,
RT_IPC_FLAG_
PRI
O
);
}
}
RT_SECTION
(
".irq.cache"
)
RT_SECTION
(
".irq.cache"
)
...
...
bsp/bluetrum/libraries/hal_drivers/drv_sdio.c
浏览文件 @
df9a23c5
...
@@ -570,7 +570,7 @@ struct rt_mmcsd_host *sdio_host_create(struct ab32_sdio_des *sdio_des)
...
@@ -570,7 +570,7 @@ struct rt_mmcsd_host *sdio_host_create(struct ab32_sdio_des *sdio_des)
sdio
->
sdio_des
.
clk_get
=
(
sdio_des
->
clk_get
==
RT_NULL
?
ab32_sdio_clk_get
:
sdio_des
->
clk_get
);
sdio
->
sdio_des
.
clk_get
=
(
sdio_des
->
clk_get
==
RT_NULL
?
ab32_sdio_clk_get
:
sdio_des
->
clk_get
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
PRI
O
);
/* set host defautl attributes */
/* set host defautl attributes */
host
->
ops
=
&
ab32_sdio_ops
;
host
->
ops
=
&
ab32_sdio_ops
;
...
...
bsp/ft2004/drivers/drv_sdctrl.c
浏览文件 @
df9a23c5
...
@@ -560,7 +560,7 @@ static rt_err_t rthw_sdctrl_create(ft_sdctrl_class_t *class_p)
...
@@ -560,7 +560,7 @@ static rt_err_t rthw_sdctrl_create(ft_sdctrl_class_t *class_p)
class_p
->
ft_sdctrl
.
config
=
*
(
FSdCtrl_Config_t
*
)
FSdCtrl_LookupConfig
(
0
);
class_p
->
ft_sdctrl
.
config
=
*
(
FSdCtrl_Config_t
*
)
FSdCtrl_LookupConfig
(
0
);
rt_event_init
(
&
class_p
->
event
,
"sdctrl"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
class_p
->
event
,
"sdctrl"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
class_p
->
mutex
,
"sdctrl"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
class_p
->
mutex
,
"sdctrl"
,
RT_IPC_FLAG_
PRI
O
);
class_p
->
host
=
host
;
class_p
->
host
=
host
;
host
->
ops
=
&
ops
;
host
->
ops
=
&
ops
;
...
...
bsp/k210/driver/dmalock.c
浏览文件 @
df9a23c5
...
@@ -30,7 +30,7 @@ static struct dmac_host _dmac_host;
...
@@ -30,7 +30,7 @@ static struct dmac_host _dmac_host;
void
dmalock_init
(
void
)
void
dmalock_init
(
void
)
{
{
rt_sem_init
(
&
_dmac_host
.
sem
,
"dma_sem"
,
DMAC_CHANNEL_COUNT
,
RT_IPC_FLAG_FIFO
);
rt_sem_init
(
&
_dmac_host
.
sem
,
"dma_sem"
,
DMAC_CHANNEL_COUNT
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
_dmac_host
.
mutex
,
"dma_mutex"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_dmac_host
.
mutex
,
"dma_mutex"
,
RT_IPC_FLAG_
PRI
O
);
for
(
int
i
=
0
;
i
<
DMAC_CHANNEL_COUNT
;
i
++
)
for
(
int
i
=
0
;
i
<
DMAC_CHANNEL_COUNT
;
i
++
)
{
{
_dmac_host
.
channel_used
[
i
]
=
0
;
_dmac_host
.
channel_used
[
i
]
=
0
;
...
...
bsp/lpc54608-LPCXpresso/drivers/drv_sd.c
浏览文件 @
df9a23c5
...
@@ -412,7 +412,7 @@ rt_err_t mci_hw_init(const char *device_name)
...
@@ -412,7 +412,7 @@ rt_err_t mci_hw_init(const char *device_name)
}
}
/* initialize mutex lock */
/* initialize mutex lock */
rt_mutex_init
(
&
_mci_device
->
lock
,
device_name
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_mci_device
->
lock
,
device_name
,
RT_IPC_FLAG_
PRI
O
);
/* create finish event */
/* create finish event */
_mci_device
->
finish_event
=
rt_event_create
(
device_name
,
RT_IPC_FLAG_FIFO
);
_mci_device
->
finish_event
=
rt_event_create
(
device_name
,
RT_IPC_FLAG_FIFO
);
...
...
bsp/lpc55sxx/Libraries/drivers/drv_sd.c
浏览文件 @
df9a23c5
...
@@ -232,7 +232,7 @@ int rt_hw_mci_init(void)
...
@@ -232,7 +232,7 @@ int rt_hw_mci_init(void)
}
}
/* initialize mutex lock */
/* initialize mutex lock */
rt_mutex_init
(
&
_mci_device
->
lock
,
"sdcard0"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_mci_device
->
lock
,
"sdcard0"
,
RT_IPC_FLAG_
PRI
O
);
/* create finish event */
/* create finish event */
_mci_device
->
finish_event
=
rt_event_create
(
"sdcard0"
,
RT_IPC_FLAG_FIFO
);
_mci_device
->
finish_event
=
rt_event_create
(
"sdcard0"
,
RT_IPC_FLAG_FIFO
);
...
...
bsp/simulator/drivers/sd_sim.c
浏览文件 @
df9a23c5
...
@@ -140,7 +140,7 @@ rt_err_t rt_hw_sdcard_init(const char *spi_device_name)
...
@@ -140,7 +140,7 @@ rt_err_t rt_hw_sdcard_init(const char *spi_device_name)
sd
=
&
_sdcard
;
sd
=
&
_sdcard
;
device
=
&
(
sd
->
parent
);
device
=
&
(
sd
->
parent
);
lock
=
rt_mutex_create
(
"lock"
,
RT_IPC_FLAG_
FIF
O
);
lock
=
rt_mutex_create
(
"lock"
,
RT_IPC_FLAG_
PRI
O
);
if
(
lock
==
RT_NULL
)
if
(
lock
==
RT_NULL
)
{
{
LOG_E
(
"Create mutex in rt_hw_sdcard_init failed!"
);
LOG_E
(
"Create mutex in rt_hw_sdcard_init failed!"
);
...
...
bsp/simulator/drivers/sdl_fb.c
浏览文件 @
df9a23c5
...
@@ -220,7 +220,7 @@ static void sdlfb_hw_init(void)
...
@@ -220,7 +220,7 @@ static void sdlfb_hw_init(void)
rt_device_register
(
RT_DEVICE
(
&
_device
),
"sdl"
,
RT_DEVICE_FLAG_RDWR
);
rt_device_register
(
RT_DEVICE
(
&
_device
),
"sdl"
,
RT_DEVICE_FLAG_RDWR
);
sdllock
=
rt_mutex_create
(
"fb"
,
RT_IPC_FLAG_
FIF
O
);
sdllock
=
rt_mutex_create
(
"fb"
,
RT_IPC_FLAG_
PRI
O
);
if
(
sdllock
==
RT_NULL
)
if
(
sdllock
==
RT_NULL
)
{
{
LOG_E
(
"Create mutex for sdlfb failed!"
);
LOG_E
(
"Create mutex for sdlfb failed!"
);
...
...
bsp/simulator/drivers/sst25vfxx_mtd_sim.c
浏览文件 @
df9a23c5
...
@@ -171,7 +171,7 @@ rt_err_t sst25vfxx_mtd_init(const char *nor_name,
...
@@ -171,7 +171,7 @@ rt_err_t sst25vfxx_mtd_init(const char *nor_name,
mtd
->
ops
=
&
sst25vfxx_mtd_ops
;
mtd
->
ops
=
&
sst25vfxx_mtd_ops
;
/* initialize mutex */
/* initialize mutex */
if
(
rt_mutex_init
(
&
flash_lock
,
nor_name
,
RT_IPC_FLAG_
FIF
O
)
!=
RT_EOK
)
if
(
rt_mutex_init
(
&
flash_lock
,
nor_name
,
RT_IPC_FLAG_
PRI
O
)
!=
RT_EOK
)
{
{
rt_kprintf
(
"init sd lock mutex failed
\n
"
);
rt_kprintf
(
"init sd lock mutex failed
\n
"
);
}
}
...
...
bsp/stm32/libraries/HAL_Drivers/drv_crypto.c
浏览文件 @
df9a23c5
...
@@ -709,7 +709,7 @@ int stm32_hw_crypto_device_init(void)
...
@@ -709,7 +709,7 @@ int stm32_hw_crypto_device_init(void)
{
{
return
-
1
;
return
-
1
;
}
}
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
PRI
O
);
return
0
;
return
0
;
}
}
INIT_DEVICE_EXPORT
(
stm32_hw_crypto_device_init
);
INIT_DEVICE_EXPORT
(
stm32_hw_crypto_device_init
);
bsp/stm32/libraries/HAL_Drivers/drv_sdio.c
浏览文件 @
df9a23c5
...
@@ -650,7 +650,7 @@ struct rt_mmcsd_host *sdio_host_create(struct stm32_sdio_des *sdio_des)
...
@@ -650,7 +650,7 @@ struct rt_mmcsd_host *sdio_host_create(struct stm32_sdio_des *sdio_des)
sdio
->
sdio_des
.
clk_get
=
(
sdio_des
->
clk_get
==
RT_NULL
?
stm32_sdio_clk_get
:
sdio_des
->
clk_get
);
sdio
->
sdio_des
.
clk_get
=
(
sdio_des
->
clk_get
==
RT_NULL
?
stm32_sdio_clk_get
:
sdio_des
->
clk_get
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
PRI
O
);
/* set host defautl attributes */
/* set host defautl attributes */
host
->
ops
=
&
ops
;
host
->
ops
=
&
ops
;
...
...
bsp/stm32/stm32h750-artpi-h750/board/port/drv_sdio.c
浏览文件 @
df9a23c5
...
@@ -517,7 +517,7 @@ int rt_hw_sdio_init(void)
...
@@ -517,7 +517,7 @@ int rt_hw_sdio_init(void)
/* wifi auto change */
/* wifi auto change */
mmcsd_change
(
host2
);
mmcsd_change
(
host2
);
#endif
#endif
mmcsd_mutex
=
rt_mutex_create
(
"mmutex"
,
RT_IPC_FLAG_
FIF
O
);
mmcsd_mutex
=
rt_mutex_create
(
"mmutex"
,
RT_IPC_FLAG_
PRI
O
);
if
(
mmcsd_mutex
==
RT_NULL
)
if
(
mmcsd_mutex
==
RT_NULL
)
{
{
...
...
bsp/stm32/stm32mp157a-st-discovery/board/ports/drv_sdio.c
浏览文件 @
df9a23c5
...
@@ -473,14 +473,14 @@ struct rt_mmcsd_host *sdio_host_create(struct stm32_sdio_des *sdio_des)
...
@@ -473,14 +473,14 @@ struct rt_mmcsd_host *sdio_host_create(struct stm32_sdio_des *sdio_des)
{
{
sdio
->
sdio_des
.
hw_sdio
=
(
struct
stm32_sdio
*
)
SDIO1_BASE_ADDRESS
;
sdio
->
sdio_des
.
hw_sdio
=
(
struct
stm32_sdio
*
)
SDIO1_BASE_ADDRESS
;
rt_event_init
(
&
sdio
->
event
,
"sdio1"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio1"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio1"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio1"
,
RT_IPC_FLAG_
PRI
O
);
}
}
if
(
sdio_des
->
hsd
.
Instance
==
SDMMC2
)
if
(
sdio_des
->
hsd
.
Instance
==
SDMMC2
)
{
{
sdio
->
sdio_des
.
hw_sdio
=
(
struct
stm32_sdio
*
)
SDIO2_BASE_ADDRESS
;
sdio
->
sdio_des
.
hw_sdio
=
(
struct
stm32_sdio
*
)
SDIO2_BASE_ADDRESS
;
rt_event_init
(
&
sdio
->
event
,
"sdio2"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio2"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio2"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio2"
,
RT_IPC_FLAG_
PRI
O
);
}
}
/* set host default attributes */
/* set host default attributes */
...
...
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_emmc.c
浏览文件 @
df9a23c5
...
@@ -503,7 +503,7 @@ struct rt_mmcsd_host *sdio_host_create(struct stm32_sdio_des *sdio_des)
...
@@ -503,7 +503,7 @@ struct rt_mmcsd_host *sdio_host_create(struct stm32_sdio_des *sdio_des)
sdio
->
sdio_des
.
hw_sdio
=
(
struct
stm32_sdio
*
)
EMMC_BASE_ADDRESS
;
sdio
->
sdio_des
.
hw_sdio
=
(
struct
stm32_sdio
*
)
EMMC_BASE_ADDRESS
;
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
PRI
O
);
/* set host default attributes */
/* set host default attributes */
host
->
ops
=
&
ops
;
host
->
ops
=
&
ops
;
host
->
freq_min
=
400
*
1000
;
host
->
freq_min
=
400
*
1000
;
...
...
bsp/stm32/stm32mp157a-st-ev1/board/ports/drv_nand.c
浏览文件 @
df9a23c5
...
@@ -640,7 +640,7 @@ int rt_hw_nand_init(void)
...
@@ -640,7 +640,7 @@ int rt_hw_nand_init(void)
LOG_D
(
"nand flash init error!"
);
LOG_D
(
"nand flash init error!"
);
return
RT_ERROR
;
return
RT_ERROR
;
}
}
rt_mutex_init
(
&
_device
.
lock
,
"nand"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_device
.
lock
,
"nand"
,
RT_IPC_FLAG_
PRI
O
);
nand_dev
.
page_size
=
4096
;
nand_dev
.
page_size
=
4096
;
nand_dev
.
pages_per_block
=
224
;
nand_dev
.
pages_per_block
=
224
;
...
...
bsp/swm320-lq100/drivers/drv_crypto.c
浏览文件 @
df9a23c5
...
@@ -217,7 +217,7 @@ int rt_hw_crypto_init(void)
...
@@ -217,7 +217,7 @@ int rt_hw_crypto_init(void)
{
{
return
-
1
;
return
-
1
;
}
}
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
PRI
O
);
return
0
;
return
0
;
}
}
INIT_BOARD_EXPORT
(
rt_hw_crypto_init
);
INIT_BOARD_EXPORT
(
rt_hw_crypto_init
);
...
...
bsp/swm320-lq100/drivers/drv_nor_flash.c
浏览文件 @
df9a23c5
...
@@ -96,7 +96,7 @@ int rt_hw_norflash_init(void)
...
@@ -96,7 +96,7 @@ int rt_hw_norflash_init(void)
mtd
.
ops
=
&
mtd_ops
;
mtd
.
ops
=
&
mtd_ops
;
/* initialize mutex */
/* initialize mutex */
if
(
rt_mutex_init
(
&
flash_lock
,
"nor"
,
RT_IPC_FLAG_
FIF
O
)
!=
RT_EOK
)
if
(
rt_mutex_init
(
&
flash_lock
,
"nor"
,
RT_IPC_FLAG_
PRI
O
)
!=
RT_EOK
)
{
{
rt_kprintf
(
"init sd lock mutex failed
\n
"
);
rt_kprintf
(
"init sd lock mutex failed
\n
"
);
return
-
RT_ERROR
;
return
-
RT_ERROR
;
...
...
bsp/swm320-lq100/drivers/drv_sdio.c
浏览文件 @
df9a23c5
...
@@ -495,7 +495,7 @@ struct rt_mmcsd_host *sdio_host_create(struct swm_sdio_des *sdio_des)
...
@@ -495,7 +495,7 @@ struct rt_mmcsd_host *sdio_host_create(struct swm_sdio_des *sdio_des)
rt_memcpy
(
&
sdio
->
sdio_des
,
sdio_des
,
sizeof
(
struct
swm_sdio_des
));
rt_memcpy
(
&
sdio
->
sdio_des
,
sdio_des
,
sizeof
(
struct
swm_sdio_des
));
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
PRI
O
);
/* set host defautl attributes */
/* set host defautl attributes */
host
->
ops
=
&
swm_sdio_ops
;
host
->
ops
=
&
swm_sdio_ops
;
...
...
bsp/swm320/drivers/drv_crypto.c
浏览文件 @
df9a23c5
...
@@ -217,7 +217,7 @@ int rt_hw_crypto_init(void)
...
@@ -217,7 +217,7 @@ int rt_hw_crypto_init(void)
{
{
return
-
1
;
return
-
1
;
}
}
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
PRI
O
);
return
0
;
return
0
;
}
}
INIT_BOARD_EXPORT
(
rt_hw_crypto_init
);
INIT_BOARD_EXPORT
(
rt_hw_crypto_init
);
...
...
bsp/swm320/drivers/drv_nor_flash.c
浏览文件 @
df9a23c5
...
@@ -96,7 +96,7 @@ int rt_hw_norflash_init(void)
...
@@ -96,7 +96,7 @@ int rt_hw_norflash_init(void)
mtd
.
ops
=
&
mtd_ops
;
mtd
.
ops
=
&
mtd_ops
;
/* initialize mutex */
/* initialize mutex */
if
(
rt_mutex_init
(
&
flash_lock
,
"nor"
,
RT_IPC_FLAG_
FIF
O
)
!=
RT_EOK
)
if
(
rt_mutex_init
(
&
flash_lock
,
"nor"
,
RT_IPC_FLAG_
PRI
O
)
!=
RT_EOK
)
{
{
rt_kprintf
(
"init sd lock mutex failed
\n
"
);
rt_kprintf
(
"init sd lock mutex failed
\n
"
);
return
-
RT_ERROR
;
return
-
RT_ERROR
;
...
...
bsp/swm320/drivers/drv_sdio.c
浏览文件 @
df9a23c5
...
@@ -495,7 +495,7 @@ struct rt_mmcsd_host *sdio_host_create(struct swm_sdio_des *sdio_des)
...
@@ -495,7 +495,7 @@ struct rt_mmcsd_host *sdio_host_create(struct swm_sdio_des *sdio_des)
rt_memcpy
(
&
sdio
->
sdio_des
,
sdio_des
,
sizeof
(
struct
swm_sdio_des
));
rt_memcpy
(
&
sdio
->
sdio_des
,
sdio_des
,
sizeof
(
struct
swm_sdio_des
));
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
sdio
->
event
,
"sdio"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sdio
->
mutex
,
"sdio"
,
RT_IPC_FLAG_
PRI
O
);
/* set host defautl attributes */
/* set host defautl attributes */
host
->
ops
=
&
swm_sdio_ops
;
host
->
ops
=
&
swm_sdio_ops
;
...
...
bsp/w60x/drivers/drv_crypto.c
浏览文件 @
df9a23c5
...
@@ -732,7 +732,7 @@ int wm_hw_crypto_device_init(void)
...
@@ -732,7 +732,7 @@ int wm_hw_crypto_device_init(void)
{
{
return
-
1
;
return
-
1
;
}
}
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_crypto_dev
.
mutex
,
RT_HWCRYPTO_DEFAULT_NAME
,
RT_IPC_FLAG_
PRI
O
);
return
0
;
return
0
;
}
}
INIT_DEVICE_EXPORT
(
wm_hw_crypto_device_init
);
INIT_DEVICE_EXPORT
(
wm_hw_crypto_device_init
);
bsp/x86/drivers/floppy.c
浏览文件 @
df9a23c5
...
@@ -339,7 +339,7 @@ void rt_floppy_init(void)
...
@@ -339,7 +339,7 @@ void rt_floppy_init(void)
{
{
struct
rt_device
*
device
;
struct
rt_device
*
device
;
rt_mutex_init
(
&
lock
,
"fdlock"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
lock
,
"fdlock"
,
RT_IPC_FLAG_
PRI
O
);
rt_sem_init
(
&
sem
,
"fdsem"
,
0
,
RT_IPC_FLAG_FIFO
);
rt_sem_init
(
&
sem
,
"fdsem"
,
0
,
RT_IPC_FLAG_FIFO
);
rt_hw_interrupt_install
(
FLOPPY_IRQ
,
rt_floppy_isr
,
RT_NULL
,
"floppy"
);
rt_hw_interrupt_install
(
FLOPPY_IRQ
,
rt_floppy_isr
,
RT_NULL
,
"floppy"
);
...
...
bsp/zynqmp-r5-axu4ev/drivers/drv_sdcard.c
浏览文件 @
df9a23c5
...
@@ -339,7 +339,7 @@ static rt_err_t rt_sdcard_init(rt_device_t dev)
...
@@ -339,7 +339,7 @@ static rt_err_t rt_sdcard_init(rt_device_t dev)
BYTE
drvnum
=
*
((
BYTE
*
)
dev
->
user_data
);
BYTE
drvnum
=
*
((
BYTE
*
)
dev
->
user_data
);
rt_snprintf
(
sdlock_name
,
sizeof
(
sdlock_name
),
"sdlock%d"
,
drvnum
);
rt_snprintf
(
sdlock_name
,
sizeof
(
sdlock_name
),
"sdlock%d"
,
drvnum
);
if
(
rt_mutex_init
(
&
sd_lock
[
drvnum
],
sdlock_name
,
RT_IPC_FLAG_
FIF
O
)
!=
RT_EOK
)
if
(
rt_mutex_init
(
&
sd_lock
[
drvnum
],
sdlock_name
,
RT_IPC_FLAG_
PRI
O
)
!=
RT_EOK
)
{
{
LOG_E
(
"init sdlock semaphore failed
\n
"
);
LOG_E
(
"init sdlock semaphore failed
\n
"
);
}
}
...
...
components/cplusplus/cxx_Mutex.cpp
浏览文件 @
df9a23c5
...
@@ -13,7 +13,7 @@ using namespace rtthread;
...
@@ -13,7 +13,7 @@ using namespace rtthread;
Mutex
::
Mutex
(
const
char
*
name
)
Mutex
::
Mutex
(
const
char
*
name
)
{
{
rt_mutex_init
(
&
mID
,
name
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
mID
,
name
,
RT_IPC_FLAG_
PRI
O
);
}
}
bool
Mutex
::
lock
(
int32_t
millisec
)
bool
Mutex
::
lock
(
int32_t
millisec
)
...
...
components/dfs/filesystems/elmfat/dfs_elm.c
浏览文件 @
df9a23c5
...
@@ -980,7 +980,7 @@ int ff_cre_syncobj(BYTE drv, FF_SYNC_t *m)
...
@@ -980,7 +980,7 @@ int ff_cre_syncobj(BYTE drv, FF_SYNC_t *m)
rt_mutex_t
mutex
;
rt_mutex_t
mutex
;
rt_snprintf
(
name
,
sizeof
(
name
),
"fat%d"
,
drv
);
rt_snprintf
(
name
,
sizeof
(
name
),
"fat%d"
,
drv
);
mutex
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
FIF
O
);
mutex
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
PRI
O
);
if
(
mutex
!=
RT_NULL
)
if
(
mutex
!=
RT_NULL
)
{
{
*
m
=
mutex
;
*
m
=
mutex
;
...
...
components/dfs/src/dfs.c
浏览文件 @
df9a23c5
...
@@ -63,7 +63,7 @@ int dfs_init(void)
...
@@ -63,7 +63,7 @@ int dfs_init(void)
memset
(
&
_fdtab
,
0
,
sizeof
(
_fdtab
));
memset
(
&
_fdtab
,
0
,
sizeof
(
_fdtab
));
/* create device filesystem lock */
/* create device filesystem lock */
rt_mutex_init
(
&
fslock
,
"fslock"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
fslock
,
"fslock"
,
RT_IPC_FLAG_
PRI
O
);
#ifdef DFS_USING_WORKDIR
#ifdef DFS_USING_WORKDIR
/* set current working directory */
/* set current working directory */
...
...
components/drivers/i2c/i2c_core.c
浏览文件 @
df9a23c5
...
@@ -24,7 +24,7 @@ rt_err_t rt_i2c_bus_device_register(struct rt_i2c_bus_device *bus,
...
@@ -24,7 +24,7 @@ rt_err_t rt_i2c_bus_device_register(struct rt_i2c_bus_device *bus,
{
{
rt_err_t
res
=
RT_EOK
;
rt_err_t
res
=
RT_EOK
;
rt_mutex_init
(
&
bus
->
lock
,
"i2c_bus_lock"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
bus
->
lock
,
"i2c_bus_lock"
,
RT_IPC_FLAG_
PRI
O
);
if
(
bus
->
timeout
==
0
)
bus
->
timeout
=
RT_TICK_PER_SECOND
;
if
(
bus
->
timeout
==
0
)
bus
->
timeout
=
RT_TICK_PER_SECOND
;
...
...
components/drivers/rtc/alarm.c
浏览文件 @
df9a23c5
...
@@ -790,7 +790,7 @@ int rt_alarm_system_init(void)
...
@@ -790,7 +790,7 @@ int rt_alarm_system_init(void)
rt_list_init
(
&
_container
.
head
);
rt_list_init
(
&
_container
.
head
);
rt_event_init
(
&
_container
.
event
,
"alarmsvc"
,
RT_IPC_FLAG_FIFO
);
rt_event_init
(
&
_container
.
event
,
"alarmsvc"
,
RT_IPC_FLAG_FIFO
);
rt_mutex_init
(
&
_container
.
mutex
,
"alarmsvc"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
_container
.
mutex
,
"alarmsvc"
,
RT_IPC_FLAG_
PRI
O
);
tid
=
rt_thread_create
(
"alarmsvc"
,
tid
=
rt_thread_create
(
"alarmsvc"
,
rt_alarmsvc_thread_init
,
RT_NULL
,
rt_alarmsvc_thread_init
,
RT_NULL
,
...
...
components/drivers/sdio/mmcsd_core.c
浏览文件 @
df9a23c5
...
@@ -708,7 +708,7 @@ struct rt_mmcsd_host *mmcsd_alloc_host(void)
...
@@ -708,7 +708,7 @@ struct rt_mmcsd_host *mmcsd_alloc_host(void)
host
->
max_blk_size
=
512
;
host
->
max_blk_size
=
512
;
host
->
max_blk_count
=
4096
;
host
->
max_blk_count
=
4096
;
rt_mutex_init
(
&
host
->
bus_lock
,
"sd_bus_lock"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
host
->
bus_lock
,
"sd_bus_lock"
,
RT_IPC_FLAG_
PRI
O
);
rt_sem_init
(
&
host
->
sem_ack
,
"sd_ack"
,
0
,
RT_IPC_FLAG_FIFO
);
rt_sem_init
(
&
host
->
sem_ack
,
"sd_ack"
,
0
,
RT_IPC_FLAG_FIFO
);
return
host
;
return
host
;
...
...
components/drivers/sensors/sensor.c
浏览文件 @
df9a23c5
...
@@ -452,7 +452,7 @@ int rt_hw_sensor_register(rt_sensor_t sensor,
...
@@ -452,7 +452,7 @@ int rt_hw_sensor_register(rt_sensor_t sensor,
if
(
sensor
->
module
!=
RT_NULL
&&
sensor
->
module
->
lock
==
RT_NULL
)
if
(
sensor
->
module
!=
RT_NULL
&&
sensor
->
module
->
lock
==
RT_NULL
)
{
{
/* Create a mutex lock for the module */
/* Create a mutex lock for the module */
sensor
->
module
->
lock
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
FIF
O
);
sensor
->
module
->
lock
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
PRI
O
);
if
(
sensor
->
module
->
lock
==
RT_NULL
)
if
(
sensor
->
module
->
lock
==
RT_NULL
)
{
{
rt_free
(
device_name
);
rt_free
(
device_name
);
...
...
components/drivers/spi/enc28j60.c
浏览文件 @
df9a23c5
...
@@ -834,7 +834,7 @@ rt_err_t enc28j60_attach(const char *spi_device_name)
...
@@ -834,7 +834,7 @@ rt_err_t enc28j60_attach(const char *spi_device_name)
enc28j60_dev
.
parent
.
eth_rx
=
enc28j60_rx
;
enc28j60_dev
.
parent
.
eth_rx
=
enc28j60_rx
;
enc28j60_dev
.
parent
.
eth_tx
=
enc28j60_tx
;
enc28j60_dev
.
parent
.
eth_tx
=
enc28j60_tx
;
rt_mutex_init
(
&
enc28j60_dev
.
lock
,
"enc28j60"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
enc28j60_dev
.
lock
,
"enc28j60"
,
RT_IPC_FLAG_
PRI
O
);
eth_device_init
(
&
(
enc28j60_dev
.
parent
),
"e0"
);
eth_device_init
(
&
(
enc28j60_dev
.
parent
),
"e0"
);
...
...
components/drivers/spi/spi_core.c
浏览文件 @
df9a23c5
...
@@ -29,7 +29,7 @@ rt_err_t rt_spi_bus_register(struct rt_spi_bus *bus,
...
@@ -29,7 +29,7 @@ rt_err_t rt_spi_bus_register(struct rt_spi_bus *bus,
return
result
;
return
result
;
/* initialize mutex lock */
/* initialize mutex lock */
rt_mutex_init
(
&
(
bus
->
lock
),
name
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
(
bus
->
lock
),
name
,
RT_IPC_FLAG_
PRI
O
);
/* set ops */
/* set ops */
bus
->
ops
=
ops
;
bus
->
ops
=
ops
;
/* initialize owner */
/* initialize owner */
...
...
components/drivers/spi/spi_flash_sfud.c
浏览文件 @
df9a23c5
...
@@ -318,7 +318,7 @@ rt_spi_flash_device_t rt_sfud_flash_probe_ex(const char *spi_flash_dev_name, con
...
@@ -318,7 +318,7 @@ rt_spi_flash_device_t rt_sfud_flash_probe_ex(const char *spi_flash_dev_name, con
if
(
rtt_dev
)
{
if
(
rtt_dev
)
{
rt_memset
(
rtt_dev
,
0
,
sizeof
(
struct
spi_flash_device
));
rt_memset
(
rtt_dev
,
0
,
sizeof
(
struct
spi_flash_device
));
/* initialize lock */
/* initialize lock */
rt_mutex_init
(
&
(
rtt_dev
->
lock
),
spi_flash_dev_name
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
(
rtt_dev
->
lock
),
spi_flash_dev_name
,
RT_IPC_FLAG_
PRI
O
);
}
}
if
(
rtt_dev
&&
sfud_dev
&&
spi_flash_dev_name_bak
&&
spi_dev_name_bak
)
{
if
(
rtt_dev
&&
sfud_dev
&&
spi_flash_dev_name_bak
&&
spi_dev_name_bak
)
{
...
...
components/drivers/src/pipe.c
浏览文件 @
df9a23c5
...
@@ -451,7 +451,7 @@ rt_pipe_t *rt_pipe_create(const char *name, int bufsz)
...
@@ -451,7 +451,7 @@ rt_pipe_t *rt_pipe_create(const char *name, int bufsz)
rt_memset
(
pipe
,
0
,
sizeof
(
rt_pipe_t
));
rt_memset
(
pipe
,
0
,
sizeof
(
rt_pipe_t
));
pipe
->
is_named
=
RT_TRUE
;
/* initialize as a named pipe */
pipe
->
is_named
=
RT_TRUE
;
/* initialize as a named pipe */
rt_mutex_init
(
&
(
pipe
->
lock
),
name
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
(
pipe
->
lock
),
name
,
RT_IPC_FLAG_
PRI
O
);
rt_wqueue_init
(
&
(
pipe
->
reader_queue
));
rt_wqueue_init
(
&
(
pipe
->
reader_queue
));
rt_wqueue_init
(
&
(
pipe
->
writer_queue
));
rt_wqueue_init
(
&
(
pipe
->
writer_queue
));
...
...
components/drivers/wlan/wlan_cfg.c
浏览文件 @
df9a23c5
...
@@ -84,7 +84,7 @@ void rt_wlan_cfg_init(void)
...
@@ -84,7 +84,7 @@ void rt_wlan_cfg_init(void)
rt_memset
(
cfg_cache
,
0
,
sizeof
(
struct
rt_wlan_cfg_des
));
rt_memset
(
cfg_cache
,
0
,
sizeof
(
struct
rt_wlan_cfg_des
));
}
}
/* init mutex lock */
/* init mutex lock */
rt_mutex_init
(
&
cfg_mutex
,
"wlan_cfg"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
cfg_mutex
,
"wlan_cfg"
,
RT_IPC_FLAG_
PRI
O
);
}
}
}
}
...
...
components/drivers/wlan/wlan_dev.c
浏览文件 @
df9a23c5
...
@@ -650,7 +650,7 @@ static rt_err_t _rt_wlan_dev_init(rt_device_t dev)
...
@@ -650,7 +650,7 @@ static rt_err_t _rt_wlan_dev_init(rt_device_t dev)
struct
rt_wlan_device
*
wlan
=
(
struct
rt_wlan_device
*
)
dev
;
struct
rt_wlan_device
*
wlan
=
(
struct
rt_wlan_device
*
)
dev
;
rt_err_t
result
=
RT_EOK
;
rt_err_t
result
=
RT_EOK
;
rt_mutex_init
(
&
wlan
->
lock
,
"wlan_dev"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
wlan
->
lock
,
"wlan_dev"
,
RT_IPC_FLAG_
PRI
O
);
if
(
wlan
->
ops
->
wlan_init
)
if
(
wlan
->
ops
->
wlan_init
)
result
=
wlan
->
ops
->
wlan_init
(
wlan
);
result
=
wlan
->
ops
->
wlan_init
(
wlan
);
...
...
components/drivers/wlan/wlan_mgnt.c
浏览文件 @
df9a23c5
...
@@ -2011,10 +2011,10 @@ int rt_wlan_init(void)
...
@@ -2011,10 +2011,10 @@ int rt_wlan_init(void)
rt_memset
(
&
_ap_mgnt
,
0
,
sizeof
(
struct
rt_wlan_mgnt_des
));
rt_memset
(
&
_ap_mgnt
,
0
,
sizeof
(
struct
rt_wlan_mgnt_des
));
rt_memset
(
&
scan_result
,
0
,
sizeof
(
struct
rt_wlan_scan_result
));
rt_memset
(
&
scan_result
,
0
,
sizeof
(
struct
rt_wlan_scan_result
));
rt_memset
(
&
sta_info
,
0
,
sizeof
(
struct
rt_wlan_sta_des
));
rt_memset
(
&
sta_info
,
0
,
sizeof
(
struct
rt_wlan_sta_des
));
rt_mutex_init
(
&
mgnt_mutex
,
"mgnt"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
mgnt_mutex
,
"mgnt"
,
RT_IPC_FLAG_
PRI
O
);
rt_mutex_init
(
&
scan_result_mutex
,
"scan"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
scan_result_mutex
,
"scan"
,
RT_IPC_FLAG_
PRI
O
);
rt_mutex_init
(
&
sta_info_mutex
,
"sta"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sta_info_mutex
,
"sta"
,
RT_IPC_FLAG_
PRI
O
);
rt_mutex_init
(
&
complete_mutex
,
"complete"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
complete_mutex
,
"complete"
,
RT_IPC_FLAG_
PRI
O
);
#ifdef RT_WLAN_AUTO_CONNECT_ENABLE
#ifdef RT_WLAN_AUTO_CONNECT_ENABLE
rt_timer_init
(
&
reconnect_time
,
"wifi_tim"
,
rt_wlan_cyclic_check
,
RT_NULL
,
rt_timer_init
(
&
reconnect_time
,
"wifi_tim"
,
rt_wlan_cyclic_check
,
RT_NULL
,
rt_tick_from_millisecond
(
AUTO_CONNECTION_PERIOD_MS
),
rt_tick_from_millisecond
(
AUTO_CONNECTION_PERIOD_MS
),
...
...
components/libc/posix/pthreads/pthread_mutex.c
浏览文件 @
df9a23c5
...
@@ -121,7 +121,7 @@ int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
...
@@ -121,7 +121,7 @@ int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr)
mutex
->
attr
=
*
attr
;
mutex
->
attr
=
*
attr
;
/* init mutex lock */
/* init mutex lock */
result
=
rt_mutex_init
(
&
(
mutex
->
lock
),
name
,
RT_IPC_FLAG_
FIF
O
);
result
=
rt_mutex_init
(
&
(
mutex
->
lock
),
name
,
RT_IPC_FLAG_
PRI
O
);
if
(
result
!=
RT_EOK
)
if
(
result
!=
RT_EOK
)
return
EINVAL
;
return
EINVAL
;
...
...
components/net/at/at_socket/at_socket.c
浏览文件 @
df9a23c5
...
@@ -313,7 +313,7 @@ static struct at_socket *alloc_socket_by_device(struct at_device *device, enum a
...
@@ -313,7 +313,7 @@ static struct at_socket *alloc_socket_by_device(struct at_device *device, enum a
if
(
at_slock
==
RT_NULL
)
if
(
at_slock
==
RT_NULL
)
{
{
/* create AT socket lock */
/* create AT socket lock */
at_slock
=
rt_mutex_create
(
"at_slock"
,
RT_IPC_FLAG_
FIF
O
);
at_slock
=
rt_mutex_create
(
"at_slock"
,
RT_IPC_FLAG_
PRI
O
);
if
(
at_slock
==
RT_NULL
)
if
(
at_slock
==
RT_NULL
)
{
{
LOG_E
(
"No memory for socket allocation lock!"
);
LOG_E
(
"No memory for socket allocation lock!"
);
...
@@ -367,7 +367,7 @@ static struct at_socket *alloc_socket_by_device(struct at_device *device, enum a
...
@@ -367,7 +367,7 @@ static struct at_socket *alloc_socket_by_device(struct at_device *device, enum a
rt_snprintf
(
name
,
RT_NAME_MAX
,
"%s%d"
,
"at_skt"
,
idx
);
rt_snprintf
(
name
,
RT_NAME_MAX
,
"%s%d"
,
"at_skt"
,
idx
);
/* create AT socket receive ring buffer lock */
/* create AT socket receive ring buffer lock */
if
((
sock
->
recv_lock
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
FIF
O
))
==
RT_NULL
)
if
((
sock
->
recv_lock
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
PRI
O
))
==
RT_NULL
)
{
{
LOG_E
(
"No memory for socket receive mutex create."
);
LOG_E
(
"No memory for socket receive mutex create."
);
rt_sem_delete
(
sock
->
recv_notice
);
rt_sem_delete
(
sock
->
recv_notice
);
...
...
components/net/at/src/at_client.c
浏览文件 @
df9a23c5
...
@@ -835,7 +835,7 @@ static int at_client_para_init(at_client_t client)
...
@@ -835,7 +835,7 @@ static int at_client_para_init(at_client_t client)
}
}
rt_snprintf
(
name
,
RT_NAME_MAX
,
"%s%d"
,
AT_CLIENT_LOCK_NAME
,
at_client_num
);
rt_snprintf
(
name
,
RT_NAME_MAX
,
"%s%d"
,
AT_CLIENT_LOCK_NAME
,
at_client_num
);
client
->
lock
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
FIF
O
);
client
->
lock
=
rt_mutex_create
(
name
,
RT_IPC_FLAG_
PRI
O
);
if
(
client
->
lock
==
RT_NULL
)
if
(
client
->
lock
==
RT_NULL
)
{
{
LOG_E
(
"AT client initialize failed! at_client_recv_lock create failed!"
);
LOG_E
(
"AT client initialize failed! at_client_recv_lock create failed!"
);
...
...
components/net/lwip-1.4.1/src/arch/sys_arch.c
浏览文件 @
df9a23c5
...
@@ -341,7 +341,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
...
@@ -341,7 +341,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
counter
++
;
counter
++
;
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
FIF
O
);
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
PRI
O
);
if
(
tmpmutex
==
RT_NULL
)
if
(
tmpmutex
==
RT_NULL
)
return
ERR_MEM
;
return
ERR_MEM
;
else
else
...
...
components/net/lwip-2.0.2/src/arch/sys_arch.c
浏览文件 @
df9a23c5
...
@@ -352,7 +352,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
...
@@ -352,7 +352,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
counter
++
;
counter
++
;
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
FIF
O
);
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
PRI
O
);
if
(
tmpmutex
==
RT_NULL
)
if
(
tmpmutex
==
RT_NULL
)
return
ERR_MEM
;
return
ERR_MEM
;
else
else
...
...
components/net/lwip-2.0.3/src/arch/sys_arch.c
浏览文件 @
df9a23c5
...
@@ -352,7 +352,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
...
@@ -352,7 +352,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
counter
++
;
counter
++
;
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
FIF
O
);
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
PRI
O
);
if
(
tmpmutex
==
RT_NULL
)
if
(
tmpmutex
==
RT_NULL
)
return
ERR_MEM
;
return
ERR_MEM
;
else
else
...
...
components/net/lwip-2.1.2/src/arch/sys_arch.c
浏览文件 @
df9a23c5
...
@@ -360,7 +360,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
...
@@ -360,7 +360,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
rt_snprintf
(
tname
,
RT_NAME_MAX
,
"%s%d"
,
SYS_LWIP_MUTEX_NAME
,
counter
);
counter
++
;
counter
++
;
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
FIF
O
);
tmpmutex
=
rt_mutex_create
(
tname
,
RT_IPC_FLAG_
PRI
O
);
if
(
tmpmutex
==
RT_NULL
)
if
(
tmpmutex
==
RT_NULL
)
return
ERR_MEM
;
return
ERR_MEM
;
else
else
...
...
components/net/sal_socket/src/sal_socket.c
浏览文件 @
df9a23c5
...
@@ -135,7 +135,7 @@ int sal_init(void)
...
@@ -135,7 +135,7 @@ int sal_init(void)
rt_memset
(
sal_dev_res_tbl
,
0
,
sizeof
(
sal_dev_res_tbl
));
rt_memset
(
sal_dev_res_tbl
,
0
,
sizeof
(
sal_dev_res_tbl
));
/* create sal socket lock */
/* create sal socket lock */
rt_mutex_init
(
&
sal_core_lock
,
"sal_lock"
,
RT_IPC_FLAG_
FIF
O
);
rt_mutex_init
(
&
sal_core_lock
,
"sal_lock"
,
RT_IPC_FLAG_
PRI
O
);
LOG_I
(
"Socket Abstraction Layer initialize success."
);
LOG_I
(
"Socket Abstraction Layer initialize success."
);
init_ok
=
RT_TRUE
;
init_ok
=
RT_TRUE
;
...
...
examples/utest/testcases/kernel/mutex_tc.c
浏览文件 @
df9a23c5
...
@@ -35,7 +35,7 @@ static void test_static_mutex_init(void)
...
@@ -35,7 +35,7 @@ static void test_static_mutex_init(void)
uassert_true
(
RT_FALSE
);
uassert_true
(
RT_FALSE
);
}
}
result
=
rt_mutex_init
(
&
static_mutex
,
"static_mutex"
,
RT_IPC_FLAG_
FIF
O
);
result
=
rt_mutex_init
(
&
static_mutex
,
"static_mutex"
,
RT_IPC_FLAG_
PRI
O
);
if
(
RT_EOK
!=
result
)
if
(
RT_EOK
!=
result
)
{
{
uassert_true
(
RT_FALSE
);
uassert_true
(
RT_FALSE
);
...
@@ -348,7 +348,7 @@ static void test_dynamic_mutex_create(void)
...
@@ -348,7 +348,7 @@ static void test_dynamic_mutex_create(void)
}
}
/* FIFO mode */
/* FIFO mode */
dynamic_mutex
=
rt_mutex_create
(
"dynamic_mutex"
,
RT_IPC_FLAG_
FIF
O
);
dynamic_mutex
=
rt_mutex_create
(
"dynamic_mutex"
,
RT_IPC_FLAG_
PRI
O
);
if
(
RT_NULL
==
dynamic_mutex
)
if
(
RT_NULL
==
dynamic_mutex
)
{
{
uassert_true
(
RT_FALSE
);
uassert_true
(
RT_FALSE
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录