提交 192136b3 编写于 作者: A arvinzzz

fix: DEFINE_MUTEX宏与linux行为保持一致

在定义变量之后进行赋值初始化

close: #I4NOFQ
Signed-off-by: Narvinzzz <zhaotianyu9@huawei.com>
Change-Id: Iff3ff2856f4a75204224970a7b1a702222abdb99
上级 9a54e6a6
......@@ -497,7 +497,7 @@ struct file_operations {
#define simple_strtol strtol
#define do_gettimeofday(a) gettimeofday(a, NULL)
#define DEFINE_MUTEX(m) pthread_mutex_t m;
#define DEFINE_MUTEX(m) pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
#define mutex_lock pthread_mutex_lock
#define mutex_unlock pthread_mutex_unlock
#define mutex_init(m) pthread_mutex_init(m, NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册