sync branch rt-smart. (#6641)

* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
This commit is contained in:
guo
2022-12-03 12:07:44 +08:00
committed by GitHub
parent aaf5462c6d
commit ecf2d82159
1693 changed files with 389530 additions and 9680 deletions

View File

@@ -24,10 +24,10 @@ extern "C" {
#define SIGEV_NONE 1 /* No asynchronous notification shall be delivered */
/* when the event of interest occurs. */
#define SIGEV_SIGNAL 2 /* A queued signal, with an application defined */
#define SIGEV_SIGNAL 0 /* A queued signal, with an application defined */
/* value, shall be delivered when the event of */
/* interest occurs. */
#define SIGEV_THREAD 3 /* A notification function shall be called to */
#define SIGEV_THREAD 2 /* A notification function shall be called to */
/* perform notification. */
/* Signal Generation and Delivery, P1003.1b-1993, p. 63
@@ -41,9 +41,9 @@ union sigval
struct sigevent
{
int sigev_notify; /* Notification type */
union sigval sigev_value;
int sigev_signo; /* Signal number */
union sigval sigev_value; /* Signal value */
int sigev_notify; /* Notification type */
void (*sigev_notify_function)( union sigval );
/* Notification function */
void *sigev_notify_attributes; /* Notification Attributes, really pthread_attr_t */

View File

@@ -99,8 +99,6 @@ time_t time(time_t* t);
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
#endif /* RT_USING_POSIX_DELAY */
#if defined(RT_USING_POSIX_CLOCK) || defined (RT_USING_POSIX_TIMER)
/* POSIX clock and timer */
#define MILLISECOND_PER_SECOND 1000UL
#define MICROSECOND_PER_SECOND 1000000UL
#define NANOSECOND_PER_SECOND 1000000000UL
@@ -109,6 +107,9 @@ int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
#define MICROSECOND_PER_TICK (MICROSECOND_PER_SECOND / RT_TICK_PER_SECOND)
#define NANOSECOND_PER_TICK (NANOSECOND_PER_SECOND / RT_TICK_PER_SECOND)
#if defined(RT_USING_POSIX_CLOCK) || defined (RT_USING_POSIX_TIMER)
/* POSIX clock and timer */
#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 1
#endif /* CLOCK_REALTIME */
@@ -126,6 +127,12 @@ int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC 4
#endif /* CLOCK_MONOTONIC */
#ifdef CLOCK_TAI
#define CLOCK_ID_MAX CLOCK_TAI
#else
#define CLOCK_ID_MAX CLOCK_MONOTONIC
#endif
#endif /* defined(RT_USING_POSIX_CLOCK) || defined (RT_USING_POSIX_TIMER) */
#ifdef RT_USING_POSIX_CLOCK
@@ -137,7 +144,7 @@ int rt_timespec_to_tick(const struct timespec *time);
#endif /* RT_USING_POSIX_CLOCK */
#ifdef RT_USING_POSIX_TIMER
#include "signal.h"
#include <sys/signal.h>
int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid);
int timer_delete(timer_t timerid);
int timer_getoverrun(timer_t timerid);