include: posix: types: Move some defs out of #ifdef CONFIG_PTHREAD_IPC

useconds_t, clockid_t, timer_t are not related to pthreads.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2018-09-27 17:50:20 +03:00 committed by Anas Nashif
commit 260fbc4249

View file

@ -15,9 +15,17 @@ extern "C" {
#include_next <sys/types.h>
#endif
#ifdef CONFIG_PTHREAD_IPC
#include <kernel.h>
typedef unsigned long useconds_t;
/* time related attributes */
#ifndef CONFIG_NEWLIB_LIBC
typedef u32_t clockid_t;
#endif /*CONFIG_NEWLIB_LIBC */
typedef unsigned long timer_t;
#ifdef CONFIG_PTHREAD_IPC
/* Thread attributes */
typedef struct pthread_attr_t {
int priority;
@ -65,13 +73,6 @@ typedef struct pthread_barrier {
typedef struct pthread_barrierattr {
} pthread_barrierattr_t;
/* time related attributes */
#ifndef CONFIG_NEWLIB_LIBC
typedef u32_t clockid_t;
#endif /*CONFIG_NEWLIB_LIBC */
typedef unsigned long timer_t;
typedef unsigned long useconds_t;
typedef u32_t pthread_rwlockattr_t;
typedef struct pthread_rwlock_obj {