未验证 提交 f7dabbf0 编写于 作者: O openharmony_ci 提交者: Gitee

!247 【liteos_m】posix接口融合

Merge pull request !247 from LiteOS/master
......@@ -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.
先完成此消息的编辑!
想要评论请 注册