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

!989 Optimize pthread_cond_init

Merge pull request !989 from 李涛/pthread_cond_init
......@@ -2127,6 +2127,7 @@ musl_src_porting_file = [
"src/thread/pthread_cond_timedwait_monotonic_np.c",
"src/thread/pthread_cond_timeout_np.c",
"src/thread/pthread_cond_clockwait.c",
"src/thread/pthread_cond_init.c",
"src/thread/pthread_create.c",
"src/thread/pthread_rwlock_clockwrlock.c",
"src/thread/pthread_rwlock_timedwrlock_monotonic_np.c",
......
#include "pthread_impl.h"
int pthread_cond_init(pthread_cond_t *restrict c, const pthread_condattr_t *restrict a)
{
__builtin_memset(c, 0, sizeof(pthread_cond_t));
if (a) {
c->_c_clock = a->__attr & 0x7fffffff;
if (a->__attr>>31) c->_c_shared = (void *)-1;
}
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册