提交 783edcd0 编写于 作者: X x_xiny

fix:...

 fix: L1-liteos-tdd测试liteos_a_process_unittest.bin,liteos_a_security_vid_unittest.bin和liteos_a_time_clock_unittest.bin模块用例un

【背景】L1-liteos-tdd测试liteos_a_process_unittest.bin,liteos_a_security_vid_unittest.bin和liteos_a_time_clock_unittest.bin模块用例un

【修改方案】
 1.暂时将musl中的exit()接口中的原子操作改为使用mutex方式实现
 2.删除内核中不必要的打印
Signed-off-by: Nxuiny <xuxinyu6@huawei.com>

Change-Id: I980c523b41dbc1f5a7f64a74a387081fdab25449
上级 c9de2b44
......@@ -2,8 +2,11 @@
#include <stdint.h>
#include <signal.h>
#include <atomic.h>
#include <pthread.h>
#include "libc.h"
pthread_mutex_t __exit_mutex = PTHREAD_MUTEX_INITIALIZER;
static void dummy()
{
}
......@@ -29,9 +32,9 @@ weak_alias(libc_exit_fini, __libc_exit_fini);
_Noreturn void exit(int code)
{
sigset_t set;
if (a_cas(&libc.exit, 0, 1) != 0) {
return;
}
pthread_mutex_lock(&__exit_mutex);
__block_app_sigs(&set);
__funcs_on_exit();
__libc_exit_fini();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册