summaryrefslogtreecommitdiff
path: root/components/libc/pthreads
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2021-02-20 12:12:56 +0800
committerGitHub <[email protected]>2021-02-20 12:12:56 +0800
commitb204651517aa1840d778f2f6fcfdc40207cab753 (patch)
treed9fc79f86a3d5de3d8d8a82c48da313a4976c9e4 /components/libc/pthreads
parente596921019839fdaf1c0c2c76a1aa13f4c083299 (diff)
parent598aa86f750bdc96ffb427fc8507a426a99fc63f (diff)
Merge pull request #4333 from mysterywolf/pthread
[pthread][libc][time] 修改pthread与libc的时间函数若干问题
Diffstat (limited to 'components/libc/pthreads')
-rw-r--r--components/libc/pthreads/pthread.c2
-rw-r--r--components/libc/pthreads/pthread_internal.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/components/libc/pthreads/pthread.c b/components/libc/pthreads/pthread.c
index 19a511b45b..7430510bf2 100644
--- a/components/libc/pthreads/pthread.c
+++ b/components/libc/pthreads/pthread.c
@@ -13,6 +13,7 @@
#include <rthw.h>
#include <pthread.h>
#include <sched.h>
+#include <sys/time.h>
#include "pthread_internal.h"
RT_DEFINE_SPINLOCK(pth_lock);
@@ -687,4 +688,3 @@ int pthread_cancel(pthread_t thread)
return 0;
}
RTM_EXPORT(pthread_cancel);
-
diff --git a/components/libc/pthreads/pthread_internal.h b/components/libc/pthreads/pthread_internal.h
index a6706ca091..240741e21a 100644
--- a/components/libc/pthreads/pthread_internal.h
+++ b/components/libc/pthreads/pthread_internal.h
@@ -13,6 +13,7 @@
#include <rtthread.h>
#include <pthread.h>
+#include <sys/time.h>
struct _pthread_cleanup
{
@@ -62,8 +63,6 @@ typedef struct _pthread_data _pthread_data_t;
_pthread_data_t *_pthread_get_data(pthread_t thread);
-int clock_time_to_tick(const struct timespec *time);
-
void posix_mq_system_init(void);
void posix_sem_system_init(void);
void pthread_key_system_init(void);