Compare commits
8 Commits
weekly_202
...
OpenHarmon
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd864ea871 | ||
|
|
e7c1633f00 | ||
|
|
5e70129199 | ||
|
|
089376994a | ||
|
|
12adfd5832 | ||
|
|
c46c5a640d | ||
|
|
c812b0c27b | ||
|
|
0164461b33 |
2
BUILD.gn
2
BUILD.gn
@@ -323,7 +323,7 @@ group("liteos_a") {
|
||||
deps += [
|
||||
":apps",
|
||||
":tests",
|
||||
"//prebuilts/lite/sysroot/build:strip",
|
||||
"//third_party/musl/scripts/build_lite:strip",
|
||||
]
|
||||
if (liteos_skip_make == false) {
|
||||
deps += [ ":make" ]
|
||||
|
||||
2
Makefile
2
Makefile
@@ -121,7 +121,7 @@ sysroot:
|
||||
$(HIDE)echo "sysroot:" $(abspath $(SYSROOT_PATH))
|
||||
ifeq ($(origin SYSROOT_PATH),file)
|
||||
$(HIDE)mkdir -p $(SYSROOT_PATH)/build && cd $(SYSROOT_PATH)/build && \
|
||||
ln -snf $(LITEOSTOPDIR)/../../prebuilts/lite/sysroot/build/Makefile && \
|
||||
ln -snf $(LITEOSTOPDIR)/../../third_party/musl/scripts/build_lite/Makefile && \
|
||||
$(MAKE) TARGETS=liteos_a_user \
|
||||
ARCH=$(ARCH) \
|
||||
TARGET=$(LOSCFG_LLVM_TARGET) \
|
||||
|
||||
@@ -42,7 +42,7 @@ copy("copy_mksh_src") {
|
||||
|
||||
build_ext_component("build_mksh") {
|
||||
deps = [ ":copy_mksh_src" ]
|
||||
deps += [ "//prebuilts/lite/sysroot" ]
|
||||
deps += [ "//third_party/musl:sysroot_lite" ]
|
||||
exec_path = rebase_path("$target_out_dir/mksh_build")
|
||||
|
||||
cflags = [
|
||||
|
||||
@@ -51,7 +51,7 @@ build_ext_component("build_toybox") {
|
||||
":copy_toybox_config",
|
||||
":copy_toybox_src",
|
||||
]
|
||||
deps += [ "//prebuilts/lite/sysroot" ]
|
||||
deps += [ "//third_party/musl:sysroot_lite" ]
|
||||
exec_path = rebase_path("$target_out_dir/toybox_build")
|
||||
|
||||
cflags = [
|
||||
|
||||
@@ -67,7 +67,7 @@ static UINT32 Testcase(VOID)
|
||||
/*
|
||||
* Check to make sure that 'value_ptr' that was passed to
|
||||
* pthread_join() and the pthread_exit() return code that
|
||||
* was used in the thread funciton are the same.
|
||||
* was used in the thread function are the same.
|
||||
*/
|
||||
ICUNIT_ASSERT_EQUAL(valuePtr, PTHREAD_EXIT_VALUE, errno);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "it_test_signal.h"
|
||||
#include "signal.h"
|
||||
|
||||
static void SigHandler(int sig) // <EFBFBD>źŴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
static void SigHandler(int sig) // źŴ
|
||||
{
|
||||
if (sig == SIGINT) {
|
||||
printf("SIGINT sig\n");
|
||||
@@ -74,8 +74,8 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("newset 1 = %x\n", newset.__bits[0]);
|
||||
printf("old 1 = %x\n", old.__bits[0]);
|
||||
printf("newset 1 = %lx\n", newset.__bits[0]);
|
||||
printf("old 1 = %lx\n", old.__bits[0]);
|
||||
|
||||
retValue = sigemptyset(&newset);
|
||||
if (retValue != 0) {
|
||||
@@ -89,8 +89,8 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("newset 2 = %x\n", newset.__bits[0]);
|
||||
printf("old 2 = %x\n", old.__bits[0]);
|
||||
printf("newset 2 = %lx\n", newset.__bits[0]);
|
||||
printf("old 2 = %lx\n", old.__bits[0]);
|
||||
|
||||
retValue = sigemptyset(&newset);
|
||||
if (retValue != 0) {
|
||||
@@ -105,8 +105,8 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("newset 1 = %x\n", newset.__bits[0]);
|
||||
printf("old 1 = %x\n", old.__bits[0]);
|
||||
printf("newset 1 = %lx\n", newset.__bits[0]);
|
||||
printf("old 1 = %lx\n", old.__bits[0]);
|
||||
|
||||
retValue = sigemptyset(&wait);
|
||||
if (retValue != 0) {
|
||||
@@ -116,7 +116,7 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("wait = %x\n", wait.__bits[0]);
|
||||
printf("wait = %lx\n", wait.__bits[0]);
|
||||
|
||||
if (sigsuspend(&wait) != -1) {
|
||||
printf("sigsuspend error\n");
|
||||
@@ -126,14 +126,14 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("old 2= %x\n", old.__bits[0]);
|
||||
printf("old 2= %lx\n", old.__bits[0]);
|
||||
|
||||
sigset_t pending;
|
||||
retValue = sigemptyset(&pending);
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("pending 1= %x\n", pending.__bits[0]);
|
||||
printf("pending 1= %lx\n", pending.__bits[0]);
|
||||
retValue = raise(SIGINT);
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
@@ -142,7 +142,7 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("pending 2= %x\n", pending.__bits[0]);
|
||||
printf("pending 2= %lx\n", pending.__bits[0]);
|
||||
|
||||
retValue = raise(SIGALRM);
|
||||
if (retValue != 0) {
|
||||
@@ -152,7 +152,7 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("pending 3= %x\n", pending.__bits[0]);
|
||||
printf("pending 3= %lx\n", pending.__bits[0]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -192,8 +192,8 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("new 1 = %x\n", new1.__bits[0]);
|
||||
printf("old 1 = %x\n", old1.__bits[0]);
|
||||
printf("new 1 = %lx\n", new1.__bits[0]);
|
||||
printf("old 1 = %lx\n", old1.__bits[0]);
|
||||
|
||||
retValue = kill(getpid(), SIGINT);
|
||||
if (retValue != 0) {
|
||||
@@ -203,7 +203,7 @@ static int TestSigSuspend()
|
||||
if (retValue != 0) {
|
||||
exit(retValue);
|
||||
}
|
||||
printf("raise 1 = %x\n", new1.__bits[0]);
|
||||
printf("raise 1 = %lx\n", new1.__bits[0]);
|
||||
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ static UINT32 Testcase(VOID)
|
||||
/*
|
||||
* Check to make sure that 'value_ptr' that was passed to
|
||||
* pthread_join() and the pthread_exit() return code that
|
||||
* was used in the thread funciton are the same.
|
||||
* was used in the thread function are the same.
|
||||
*/
|
||||
ICUNIT_ASSERT_EQUAL(valuePtr, PTHREAD_EXIT_VALUE, errno);
|
||||
|
||||
|
||||
@@ -64,12 +64,8 @@ EXIT:
|
||||
|
||||
static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = 0;
|
||||
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
|
||||
|
||||
@@ -65,10 +65,8 @@ static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = 0;
|
||||
int currThreadPri, currThreadPolicy;
|
||||
|
||||
@@ -74,12 +74,9 @@ static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
int count = 0;
|
||||
int currThreadPri, currThreadPolicy;
|
||||
|
||||
g_preTaskPri = 0xffffffff;
|
||||
|
||||
@@ -49,8 +49,6 @@ static void *ThreadFuncTest3(void *a)
|
||||
int ret;
|
||||
int tid = Gettid();
|
||||
pthread_t thread = pthread_self();
|
||||
int currThreadPri, currThreadPolicy;
|
||||
struct sched_param param = { 0 };
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -124,14 +122,10 @@ EXIT:
|
||||
|
||||
static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = 0;
|
||||
|
||||
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
|
||||
pthread_mutex_init(&g_muxLock001, &mutex);
|
||||
pthread_mutex_init(&g_muxLock002, &mutex);
|
||||
|
||||
@@ -49,8 +49,6 @@ static void *ThreadFuncTest3(void *a)
|
||||
int ret;
|
||||
int tid;
|
||||
pthread_t thread = pthread_self();
|
||||
int currThreadPri, currThreadPolicy;
|
||||
struct sched_param param = { 0 };
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -126,14 +124,10 @@ EXIT:
|
||||
|
||||
static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = 0;
|
||||
|
||||
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
|
||||
pthread_mutex_init(&g_muxLock001, &mutex);
|
||||
pthread_mutex_init(&g_muxLock002, &mutex);
|
||||
|
||||
@@ -48,8 +48,6 @@ static void *ThreadFuncTest3(void *a)
|
||||
{
|
||||
int ret;
|
||||
int tid = Gettid();
|
||||
int currThreadPri, currThreadPolicy;
|
||||
struct sched_param param = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
@@ -118,18 +116,14 @@ static void *ThreadFuncTest1(void *a)
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
|
||||
EXIT:
|
||||
return nullptr;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = 0;
|
||||
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
|
||||
pthread_mutex_init(&g_mutexLock001, &mutex);
|
||||
pthread_mutex_init(&g_mutexLock002, &mutex);
|
||||
|
||||
@@ -43,7 +43,6 @@ static void *ThreadFuncTest3(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
int currThreadPri, currThreadPolicy;
|
||||
struct sched_param param = { 0 };
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
@@ -62,7 +61,7 @@ static void *ThreadFuncTest3(void *a)
|
||||
g_testToCount003++;
|
||||
|
||||
while (g_testToCount002 == 0) {
|
||||
SLEEP_AND_YIELD(2); // 2, delay enouge time
|
||||
SLEEP_AND_YIELD(2); // 2, delay enough time
|
||||
}
|
||||
|
||||
ret = pthread_mutex_unlock(&g_muxLock003);
|
||||
@@ -96,7 +95,7 @@ static void *ThreadFuncTest2(void *a)
|
||||
g_testToCount002++;
|
||||
|
||||
while (g_testToCount001 == 0) {
|
||||
SLEEP_AND_YIELD(2); // 2, delay enouge time
|
||||
SLEEP_AND_YIELD(2); // 2, delay enough time
|
||||
}
|
||||
|
||||
ret = pthread_mutex_unlock(&g_muxLock002);
|
||||
@@ -141,12 +140,8 @@ EXIT:
|
||||
|
||||
static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex = { 0 };
|
||||
int index = TEST_COUNT;
|
||||
|
||||
|
||||
@@ -41,8 +41,6 @@ static void *ThreadFuncTest3(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
int currThreadPri, currThreadPolicy;
|
||||
struct sched_param param = { 0 };
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
@@ -120,12 +118,8 @@ EXIT:
|
||||
|
||||
static int Testcase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread, newPthread1;
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = TEST_COUNT;
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ static int g_testBackCount = 0;
|
||||
static void *ThreadFuncTest3(void *a)
|
||||
{
|
||||
int ret;
|
||||
int tid = Gettid();
|
||||
pthread_t thread = pthread_self();
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
@@ -59,8 +58,6 @@ EXIT:
|
||||
static void *ThreadFuncTest2(void *a)
|
||||
{
|
||||
int ret;
|
||||
int tid = Gettid();
|
||||
pthread_t thread = pthread_self();
|
||||
|
||||
g_testBackCount++;
|
||||
ret = pthread_mutex_lock(&g_mutexLock);
|
||||
@@ -78,10 +75,8 @@ static int TestCase(void)
|
||||
{
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
void *res = nullptr;
|
||||
int currThreadPri, currThreadPolicy;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread;
|
||||
pthread_mutexattr_t mutex;
|
||||
pthread_mutexattr_settype(&mutex, PTHREAD_MUTEX_NORMAL);
|
||||
|
||||
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -69,7 +67,6 @@ EXIT:
|
||||
static void *ThreadFuncTest1(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
@@ -106,9 +103,7 @@ static int Testcase(void)
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
int threadCount;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread[10], newPthread1;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = TEST_COUNT;
|
||||
|
||||
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -69,9 +67,6 @@ EXIT:
|
||||
static void *ThreadFuncTest1(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
ret = pthread_mutex_lock(&g_muxLock001);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -96,7 +91,6 @@ EXIT:
|
||||
static void *ThreadFuncTest0(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
@@ -136,9 +130,7 @@ static int Testcase(void)
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
int threadCount;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread[10], newPthread1;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = TEST_COUNT;
|
||||
|
||||
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -69,9 +67,6 @@ EXIT:
|
||||
static void *ThreadFuncTest1(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
ret = pthread_mutex_lock(&g_muxLock001);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -96,7 +91,6 @@ EXIT:
|
||||
static void *ThreadFuncTest0(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
@@ -136,9 +130,7 @@ static int Testcase(void)
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
int threadCount;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread[10], newPthread1;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = TEST_COUNT;
|
||||
|
||||
@@ -45,8 +45,6 @@ static void *ThreadFuncTest2(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
ret = pthread_detach(thread);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -69,9 +67,6 @@ EXIT:
|
||||
static void *ThreadFuncTest1(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
ret = pthread_mutex_lock(&g_muxLock001);
|
||||
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
|
||||
@@ -96,7 +91,6 @@ EXIT:
|
||||
static void *ThreadFuncTest0(void *a)
|
||||
{
|
||||
int ret;
|
||||
pthread_t thread = pthread_self();
|
||||
struct timespec time;
|
||||
struct timeval timeVal = { 0 };
|
||||
|
||||
@@ -136,9 +130,7 @@ static int Testcase(void)
|
||||
struct sched_param param = { 0 };
|
||||
int ret;
|
||||
int threadCount;
|
||||
void *res = nullptr;
|
||||
pthread_attr_t a = { 0 };
|
||||
pthread_t thread = pthread_self();
|
||||
pthread_t newPthread[10], newPthread1;
|
||||
pthread_mutexattr_t mutex;
|
||||
int index = TEST_COUNT;
|
||||
|
||||
Reference in New Issue
Block a user