From ea1d4aec4c0740da3ecfa7b3caf6c47b385e9fe5 Mon Sep 17 00:00:00 2001 From: w00349915 Date: Tue, 1 Sep 2020 21:44:04 +0800 Subject: [PATCH] TicketNo:AR000E0QAB Description:c musl delete print Team: OTHERS Feature or Bugfix:Feature Binary Source:No PrivateCode(Yes/No):No Change-Id: I53029c21fad973f20e6efed2f3164e2a5e05d007 Reviewed-on: http://mgit-tm.rnd.huawei.com/10577995 Tested-by: public jenkins Reviewed-by: chenwei 00346986 Reviewed-by: jianghan 00316535 Reviewed-by: shenwei 00579521 --- src/env/unsetenv.c | 2 -- src/locale/strxfrm.c | 2 -- src/thread/pthread_attr_destroy.c | 2 -- src/thread/pthread_attr_get.c | 10 ---------- src/thread/pthread_getcpuclockid.c | 2 ++ src/thread/pthread_setschedparam.c | 2 -- src/unistd/dup.c | 2 -- 7 files changed, 2 insertions(+), 20 deletions(-) mode change 100644 => 100755 src/thread/pthread_getcpuclockid.c diff --git a/src/env/unsetenv.c b/src/env/unsetenv.c index 07b824d1..b14c4c92 100755 --- a/src/env/unsetenv.c +++ b/src/env/unsetenv.c @@ -2,14 +2,12 @@ #include #include #include -#include static void dummy(char *old, char *new) {} weak_alias(dummy, __env_rm_add); int unsetenv(const char *name) { - unsupported_api(__FUNCTION__); size_t l = __strchrnul(name, '=') - name; if (!l || name[l]) { errno = EINVAL; diff --git a/src/locale/strxfrm.c b/src/locale/strxfrm.c index 04283f1d..c66c6203 100755 --- a/src/locale/strxfrm.c +++ b/src/locale/strxfrm.c @@ -1,12 +1,10 @@ #include #include -#include #include "locale_impl.h" /* collate only by code points */ size_t __strxfrm_l(char *restrict dest, const char *restrict src, size_t n, locale_t loc) { - unsupported_api(__FUNCTION__); size_t l = strlen(src); if (n > l) strcpy(dest, src); return l; diff --git a/src/thread/pthread_attr_destroy.c b/src/thread/pthread_attr_destroy.c index 03e56edf..b5845dd0 100755 --- a/src/thread/pthread_attr_destroy.c +++ b/src/thread/pthread_attr_destroy.c @@ -1,8 +1,6 @@ -#include #include "pthread_impl.h" int pthread_attr_destroy(pthread_attr_t *a) { - unsupported_api(__FUNCTION__); return 0; } diff --git a/src/thread/pthread_attr_get.c b/src/thread/pthread_attr_get.c index 245c8117..f38d7bc3 100755 --- a/src/thread/pthread_attr_get.c +++ b/src/thread/pthread_attr_get.c @@ -3,48 +3,41 @@ int pthread_attr_getdetachstate(const pthread_attr_t *a, int *state) { - unsupported_api(__FUNCTION__); *state = a->_a_detach; return 0; } int pthread_attr_getguardsize(const pthread_attr_t *restrict a, size_t *restrict size) { - unsupported_api(__FUNCTION__); *size = a->_a_guardsize; return 0; } int pthread_attr_getinheritsched(const pthread_attr_t *restrict a, int *restrict inherit) { - unsupported_api(__FUNCTION__); *inherit = a->_a_sched; return 0; } int pthread_attr_getschedparam(const pthread_attr_t *restrict a, struct sched_param *restrict param) { - unsupported_api(__FUNCTION__); param->sched_priority = a->_a_prio; return 0; } int pthread_attr_getschedpolicy(const pthread_attr_t *restrict a, int *restrict policy) { - unsupported_api(__FUNCTION__); *policy = a->_a_policy; return 0; } int pthread_attr_getscope(const pthread_attr_t *restrict a, int *restrict scope) { - unsupported_api(__FUNCTION__); *scope = PTHREAD_SCOPE_PROCESS; return 0; } int pthread_attr_getstack(const pthread_attr_t *restrict a, void **restrict addr, size_t *restrict size) { - unsupported_api(__FUNCTION__); if (!a->_a_stackaddr) return EINVAL; *size = a->_a_stacksize; @@ -54,7 +47,6 @@ int pthread_attr_getstack(const pthread_attr_t *restrict a, void **restrict addr int pthread_attr_getstacksize(const pthread_attr_t *restrict a, size_t *restrict size) { - unsupported_api(__FUNCTION__); *size = a->_a_stacksize; return 0; } @@ -68,7 +60,6 @@ int pthread_barrierattr_getpshared(const pthread_barrierattr_t *restrict a, int int pthread_condattr_getclock(const pthread_condattr_t *restrict a, clockid_t *restrict clk) { - unsupported_api(__FUNCTION__); *clk = a->__attr & 0x7fffffff; return 0; } @@ -102,7 +93,6 @@ int pthread_mutexattr_getrobust(const pthread_mutexattr_t *restrict a, int *rest int pthread_mutexattr_gettype(const pthread_mutexattr_t *restrict a, int *restrict type) { - unsupported_api(__FUNCTION__); *type = a->__attr & 3; return 0; } diff --git a/src/thread/pthread_getcpuclockid.c b/src/thread/pthread_getcpuclockid.c old mode 100644 new mode 100755 index 9df14fb6..41c6b7d9 --- a/src/thread/pthread_getcpuclockid.c +++ b/src/thread/pthread_getcpuclockid.c @@ -1,7 +1,9 @@ +#include #include "pthread_impl.h" int pthread_getcpuclockid(pthread_t t, clockid_t *clockid) { + unsupported_api(__FUNCTION__); *clockid = (-t->tid-1)*8U + 6; return 0; } diff --git a/src/thread/pthread_setschedparam.c b/src/thread/pthread_setschedparam.c index 73a5fd44..1d781d13 100755 --- a/src/thread/pthread_setschedparam.c +++ b/src/thread/pthread_setschedparam.c @@ -1,4 +1,3 @@ -#include #include "pthread_impl.h" #include "lock.h" @@ -6,7 +5,6 @@ int pthread_setschedparam(pthread_t t, int policy, const struct sched_param *par { int r; - unsupported_api(__FUNCTION__); if (policy != SCHED_RR && policy != SCHED_FIFO) { return EINVAL; } diff --git a/src/unistd/dup.c b/src/unistd/dup.c index 50731162..7fee0120 100755 --- a/src/unistd/dup.c +++ b/src/unistd/dup.c @@ -1,9 +1,7 @@ #include #include "syscall.h" -#include int dup(int fd) { - unsupported_api(__FUNCTION__); return syscall(SYS_dup, fd); } -- GitLab