lib: posix: Move posix layer from 'kernel' to 'lib'

Move posix layer from 'kernel' to 'lib' folder as it is not
a core kernel feature.

Fixed posix header file dependencies as part of the move and
also removed NEWLIBC related macros from posix headers.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
This commit is contained in:
Ramakrishna Pallala 2018-04-05 22:41:15 +05:30 committed by Anas Nashif
commit f603e603bb
24 changed files with 130 additions and 123 deletions

View file

@ -8,7 +8,7 @@
#define __MQUEUE_H__
#include <kernel.h>
#include <time.h>
#include <posix/time.h>
#include "sys/types.h"
#ifdef __cplusplus

View file

@ -8,10 +8,10 @@
#define __PTHREAD_H__
#include <kernel.h>
#include <time.h>
#include <posix/time.h>
#include <posix/unistd.h>
#include "sys/types.h"
#include "posix_sched.h"
#include "unistd.h"
enum pthread_state {
/* The thread is running and joinable. */

View file

@ -10,8 +10,8 @@
extern "C" {
#endif
#include <posix/time.h>
#include "sys/types.h"
#include <time.h>
int sem_destroy(sem_t *semaphore);
int sem_getvalue(sem_t *restrict semaphore, int *restrict value);

View file

@ -10,9 +10,6 @@
extern "C" {
#endif
#ifdef CONFIG_NEWLIB_LIBC
#include_next <time.h>
#else
struct timespec {
signed int tv_sec;
signed int tv_nsec;
@ -22,7 +19,6 @@ struct itimerspec {
struct timespec it_interval; /* Timer interval */
struct timespec it_value; /* Timer expiration */
};
#endif /* CONFIG_NEWLIB_LIBC */
#include <kernel.h>
#include <errno.h>

View file

@ -12,10 +12,6 @@ extern "C" {
#include "sys/types.h"
#ifndef __ZEPHYR__
#include_next <unistd.h>
#endif
unsigned sleep(unsigned int seconds);
int usleep(useconds_t useconds);