提交 c65997b8 编写于 作者: L LiteOS2021

feat(alltypes.h pthread.h): 在pthread_mutex_t添加pthread_mutexattr_t stAttr。删除pthread_equal宏定义。

在pthread_mutex_t添加pthread_mutexattr_t stAttr结构体变量。删除pthread_equal宏定义。
Signed-off-by: NLiteOS2021 <dinglu@huawei.com>
上级 9b8cfcc9
......@@ -550,7 +550,7 @@ typedef struct {
#endif
#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t)
typedef struct { unsigned int magic; unsigned int handle; } pthread_mutex_t;
typedef struct { unsigned int magic; unsigned int handle; pthread_mutexattr_t stAttr;} pthread_mutex_t;
#define __DEFINED_pthread_mutex_t
#endif
......
......@@ -57,9 +57,10 @@ extern "C" {
#define _MUX_MAGIC 0xEBCFDEA0
#define _MUX_INVALID_HANDLE 0xEEEEEEEF
#define PTHREAD_MUTEX_INITIALIZER { _MUX_MAGIC, _MUX_INVALID_HANDLE }
#define PTHREAD_MUTEXATTR_INITIALIZER { PTHREAD_MUTEX_RECURSIVE }
#define PTHREAD_MUTEX_INITIALIZER { _MUX_MAGIC, _MUX_INVALID_HANDLE, PTHREAD_MUTEXATTR_INITIALIZER }
#ifdef _GNU_SOURCE
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { _MUX_MAGIC, _MUX_INVALID_HANDLE }
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { _MUX_MAGIC, _MUX_INVALID_HANDLE, PTHREAD_MUTEXATTR_INITIALIZER }
#endif
#define PTHREAD_RWLOCK_INITIALIZER {{{0}}}
#define PTHREAD_COND_INITIALIZER {{{0}}}
......@@ -90,9 +91,6 @@ __attribute__((const))
pthread_t pthread_self(void);
int pthread_equal(pthread_t, pthread_t);
#ifndef __cplusplus
#define pthread_equal(x,y) ((x)==(y))
#endif
int pthread_setcancelstate(int, int *);
int pthread_setcanceltype(int, int *);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册