syscall: Fix typo error in cvs and header file

and reoder the entry in cvs file

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-05-06 17:24:42 +08:00
committed by patacongo
parent 2c0381da87
commit a2d924eea4
33 changed files with 439 additions and 408 deletions
+2 -2
View File
@@ -166,10 +166,10 @@ int aio_error(FAR const struct aiocb *aiocbp);
int aio_fsync(int op, FAR struct aiocb *aiocbp);
int aio_read(FAR struct aiocb *aiocbp);
ssize_t aio_return(FAR struct aiocb *aiocbp);
int aio_suspend(FAR const struct aiocb *const list[], int nent,
int aio_suspend(FAR const struct aiocb * const list[], int nent,
FAR const struct timespec *timeout);
int aio_write(FAR struct aiocb *aiocbp);
int lio_listio(int mode, FAR struct aiocb *const list[], int nent,
int lio_listio(int mode, FAR struct aiocb * const list[], int nent,
FAR struct sigevent *sig);
#undef EXTERN
+1 -1
View File
@@ -171,7 +171,7 @@ extern "C"
/* POSIX-like File System Interfaces */
int open(const char *path, int oflag, ...);
int open(FAR const char *path, int oflag, ...);
int fcntl(int fd, int cmd, ...);
#undef EXTERN
+2 -2
View File
@@ -85,7 +85,7 @@ extern "C"
********************************************************************************/
mqd_t mq_open(FAR const char *mq_name, int oflags, ...);
int mq_close(mqd_t mqdes );
int mq_close(mqd_t mqdes);
int mq_unlink(FAR const char *mq_name);
int mq_send(mqd_t mqdes, FAR const char *msg, size_t msglen,
unsigned int prio);
@@ -96,7 +96,7 @@ ssize_t mq_receive(mqd_t mqdes, FAR char *msg, size_t msglen,
ssize_t mq_timedreceive(mqd_t mqdes, FAR char *msg, size_t msglen,
FAR unsigned int *prio,
FAR const struct timespec *abstime);
int mq_notify(mqd_t mqdes, const struct sigevent *notification);
int mq_notify(mqd_t mqdes, FAR const struct sigevent *notification);
int mq_setattr(mqd_t mqdes, FAR const struct mq_attr *mq_stat,
FAR struct mq_attr *oldstat);
int mq_getattr(mqd_t mqdes, FAR struct mq_attr *mq_stat);
+1 -1
View File
@@ -73,7 +73,7 @@ extern "C"
*
****************************************************************************/
int match(const char *pattern, const char *string);
int match(FAR const char *pattern, FAR const char *string);
#undef EXTERN
#ifdef __cplusplus
+15 -5
View File
@@ -438,12 +438,12 @@ int pthread_attr_init(FAR pthread_attr_t *attr);
/* An attributes object can be deleted when it is no longer needed. */
int pthread_attr_destroy(pthread_attr_t *attr);
int pthread_attr_destroy(FAR pthread_attr_t *attr);
/* Set or obtain the default scheduling algorithm */
int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy);
int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr, int *policy);
int pthread_attr_getschedpolicy(FAR const pthread_attr_t *attr, FAR int *policy);
int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
FAR const struct sched_param *param);
int pthread_attr_getschedparam(FAR const pthread_attr_t *attr,
@@ -466,7 +466,8 @@ int pthread_attr_getaffinity_np(FAR const pthread_attr_t *attr,
/* Set or obtain the default stack size */
int pthread_attr_setstacksize(FAR pthread_attr_t *attr, size_t stacksize);
int pthread_attr_getstacksize(FAR const pthread_attr_t *attr, size_t *stackaddr);
int pthread_attr_getstacksize(FAR const pthread_attr_t *attr,
FAR size_t *stackaddr);
/* Set or obtain stack address and size attributes */
@@ -566,8 +567,9 @@ int pthread_mutexattr_getpshared(FAR const pthread_mutexattr_t *attr,
FAR int *pshared);
int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr,
int pshared);
int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
int pthread_mutexattr_gettype(FAR const pthread_mutexattr_t *attr,
FAR int *type);
int pthread_mutexattr_settype(FAR pthread_mutexattr_t *attr, int type);
int pthread_mutexattr_getprotocol(FAR const pthread_mutexattr_t *attr,
FAR int *protocol);
int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr,
@@ -682,9 +684,17 @@ int pthread_spin_unlock(FAR pthread_spinlock_t *lock);
#else /* __INCLUDE_PTHREAD_H */
/********************************************************************************
* Included Files
********************************************************************************/
#include <sys/types.h>
#include <stdbool.h>
/********************************************************************************
* Public Type Definitions
********************************************************************************/
/* Avoid circular dependencies by assuring that simple type definitions are
* available in any inclusion ordering.
*/
+2 -2
View File
@@ -252,8 +252,8 @@ void task_testcancel(void);
/* Task Scheduling Interfaces (based on POSIX APIs) */
int sched_setparam(pid_t pid, const struct sched_param *param);
int sched_getparam(pid_t pid, struct sched_param *param);
int sched_setparam(pid_t pid, FAR const struct sched_param *param);
int sched_getparam(pid_t pid, FAR struct sched_param *param);
int sched_setscheduler(pid_t pid, int policy,
FAR const struct sched_param *param);
int sched_getscheduler(pid_t pid);
+29 -16
View File
@@ -51,6 +51,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* Configuration ************************************************************/
#ifndef CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE
@@ -71,6 +72,7 @@
/****************************************************************************
* Type Definitions
****************************************************************************/
/* "The spawn.h header shall define the posix_spawnattr_t and
* posix_spawn_file_actions_t types used in performing spawn operations.
*
@@ -88,7 +90,7 @@ struct posix_spawnattr_s
uint8_t policy; /* Task scheduling policy */
#ifdef CONFIG_SCHED_SPORADIC
uint8_t low_priority; /* Low scheduling priority*/
uint8_t low_priority; /* Low scheduling priority */
uint8_t max_repl; /* Maximum pending replenishments */
#endif
@@ -121,6 +123,7 @@ typedef FAR void *posix_spawn_file_actions_t;
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/* "The following shall be declared as functions and may also be defined as
* macros. Function prototypes shall be provided."
*/
@@ -131,6 +134,7 @@ extern "C"
#endif
/* Spawn interfaces *********************************************************/
/* Standard posix_spawn[p] interfaces. These functions execute files in the
* file system at 'path'
*/
@@ -139,14 +143,14 @@ extern "C"
int posix_spawnp(FAR pid_t *pid, FAR const char *path,
FAR const posix_spawn_file_actions_t *file_actions,
FAR const posix_spawnattr_t *attr,
FAR char *const argv[], FAR char *const envp[]);
FAR char * const argv[], FAR char * const envp[]);
#define posix_spawn(pid,path,file_actions,attr,argv,envp) \
posix_spawnp(pid,path,file_actions,attr,argv,envp)
#else
int posix_spawn(FAR pid_t *pid, FAR const char *path,
FAR const posix_spawn_file_actions_t *file_actions,
FAR const posix_spawnattr_t *attr,
FAR char *const argv[], FAR char *const envp[]);
FAR char * const argv[], FAR char * const envp[]);
#define posix_spawnp(pid,path,file_actions,attr,argv,envp) \
posix_spawn(pid,path,file_actions,attr,argv,envp)
#endif
@@ -160,25 +164,32 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path,
int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry,
FAR const posix_spawn_file_actions_t *file_actions,
FAR const posix_spawnattr_t *attr,
FAR char *const argv[], FAR char *const envp[]);
FAR char * const argv[], FAR char * const envp[]);
#endif
/* File action interfaces ***************************************************/
/* File action initialization and destruction */
int posix_spawn_file_actions_init(FAR posix_spawn_file_actions_t *file_actions);
int posix_spawn_file_actions_destroy(FAR posix_spawn_file_actions_t *file_actions);
int posix_spawn_file_actions_init(
FAR posix_spawn_file_actions_t *file_actions);
int posix_spawn_file_actions_destroy(
FAR posix_spawn_file_actions_t *file_actions);
/* Add file action interfaces */
int posix_spawn_file_actions_addclose(FAR posix_spawn_file_actions_t *file_actions,
int posix_spawn_file_actions_addclose(
FAR posix_spawn_file_actions_t *file_actions,
int fd);
int posix_spawn_file_actions_adddup2(FAR posix_spawn_file_actions_t *file_actions,
int posix_spawn_file_actions_adddup2(
FAR posix_spawn_file_actions_t *file_actions,
int fd1, int fd2);
int posix_spawn_file_actions_addopen(FAR posix_spawn_file_actions_t *file_actions,
int posix_spawn_file_actions_addopen(
FAR posix_spawn_file_actions_t *file_actions,
int fd, FAR const char *path, int oflags, mode_t mode);
/* Spawn attributes interfaces **********************************************/
/* Spawn attributes initialization and destruction */
int posix_spawnattr_init(FAR posix_spawnattr_t *attr);
@@ -188,12 +199,13 @@ int posix_spawnattr_init(FAR posix_spawnattr_t *attr);
/* Get spawn attributes interfaces */
int posix_spawnattr_getflags(FAR const posix_spawnattr_t *attr, FAR short *flags);
int posix_spawnattr_getflags(FAR const posix_spawnattr_t *attr,
FAR short *flags);
#define posix_spawnattr_getpgroup(attr,group) (ENOSYS)
int posix_spawnattr_getschedparam(FAR const posix_spawnattr_t *attr,
FAR struct sched_param *param);
FAR struct sched_param *param);
int posix_spawnattr_getschedpolicy(FAR const posix_spawnattr_t *attr,
FAR int *policy);
FAR int *policy);
#define posix_spawnattr_getsigdefault(attr,sigdefault) (ENOSYS)
int posix_spawnattr_getsigmask(FAR const posix_spawnattr_t *attr,
FAR sigset_t *sigmask);
@@ -203,7 +215,7 @@ int posix_spawnattr_getsigmask(FAR const posix_spawnattr_t *attr,
int posix_spawnattr_setflags(FAR posix_spawnattr_t *attr, short flags);
#define posix_spawnattr_setpgroup(attr,group) (ENOSYS)
int posix_spawnattr_setschedparam(FAR posix_spawnattr_t *attr,
FAR const struct sched_param *param);
FAR const struct sched_param *param);
int posix_spawnattr_setschedpolicy(FAR posix_spawnattr_t *attr, int policy);
#define posix_spawnattr_setsigdefault(attr,sigdefault) (ENOSYS)
int posix_spawnattr_setsigmask(FAR posix_spawnattr_t *attr,
@@ -214,14 +226,15 @@ int posix_spawnattr_setsigmask(FAR posix_spawnattr_t *attr,
*/
int task_spawnattr_getstacksize(FAR const posix_spawnattr_t *attr,
size_t *stacksize);
size_t *stacksize);
int task_spawnattr_setstacksize(FAR posix_spawnattr_t *attr,
size_t stacksize);
size_t stacksize);
/* Non standard debug functions */
#ifdef CONFIG_DEBUG_FEATURES
void posix_spawn_file_actions_dump(FAR posix_spawn_file_actions_t *file_actions);
void posix_spawn_file_actions_dump(
FAR posix_spawn_file_actions_t *file_actions);
void posix_spawnattr_dump(FAR posix_spawnattr_t *attr);
#else
# define posix_spawn_file_actions_dump(fa)
+3 -3
View File
@@ -141,7 +141,7 @@ extern "C"
/* Operations on streams (FILE) */
void clearerr(register FILE *stream);
void clearerr(FAR FILE *stream);
int fclose(FAR FILE *stream);
int fflush(FAR FILE *stream);
int feof(FAR FILE *stream);
@@ -149,7 +149,7 @@ int ferror(FAR FILE *stream);
int fileno(FAR FILE *stream);
int fgetc(FAR FILE *stream);
int fgetpos(FAR FILE *stream, FAR fpos_t *pos);
char *fgets(FAR char *s, int n, FAR FILE *stream);
FAR char *fgets(FAR char *s, int n, FAR FILE *stream);
FAR FILE *fopen(FAR const char *path, FAR const char *type);
int fprintf(FAR FILE *stream, FAR const IPTR char *format, ...);
int fputc(int c, FAR FILE *stream);
@@ -181,7 +181,7 @@ int printf(FAR const IPTR char *fmt, ...);
int puts(FAR const char *s);
int rename(FAR const char *oldpath, FAR const char *newpath);
int sprintf(FAR char *buf, FAR const IPTR char *fmt, ...);
int asprintf (FAR char **ptr, FAR const IPTR char *fmt, ...);
int asprintf(FAR char **ptr, FAR const IPTR char *fmt, ...);
int snprintf(FAR char *buf, size_t size,
FAR const IPTR char *fmt, ...);
int sscanf(FAR const char *buf, FAR const IPTR char *fmt, ...);
+14 -13
View File
@@ -48,8 +48,8 @@
* Pre-processor Definitions
****************************************************************************/
/* The socket()domain parameter specifies a communication domain; this selects
* the protocol family which will be used for communication.
/* The socket()domain parameter specifies a communication domain; this
* selects the protocol family which will be used for communication.
*/
/* Supported Protocol Families */
@@ -104,7 +104,7 @@
* required to read an entire packet with each read
* system call.
*/
#define SOCK_PACKET 10 /* Obsolete and should not be used in new programs */
#define SOCK_PACKET 10 /* Obsolete and should not be used in new programs */
/* Bits in the FLAGS argument to `send', `recv', et al. These are the bits
* recognized by Linux, not all are supported by NuttX.
@@ -254,14 +254,14 @@
* Type Definitions
****************************************************************************/
/* sockaddr_storage structure. This structure must be (1) large enough to
* accommodate all supported protocol-specific address structures, and (2)
* aligned at an appropriate boundary so that pointers to it can be cast
* as pointers to protocol-specific address structures and used to access
* the fields of those structures without alignment problems.
*
* REVISIT: sizeof(struct sockaddr_storge) should be 128 bytes.
*/
/* sockaddr_storage structure. This structure must be (1) large enough to
* accommodate all supported protocol-specific address structures, and (2)
* aligned at an appropriate boundary so that pointers to it can be cast
* as pointers to protocol-specific address structures and used to access
* the fields of those structures without alignment problems.
*
* REVISIT: sizeof(struct sockaddr_storge) should be 128 bytes.
*/
#ifdef CONFIG_NET_IPv6
struct sockaddr_storage
@@ -324,7 +324,8 @@ static inline FAR struct cmsghdr *__cmsg_nxthdr(FAR void *__ctl,
{
FAR struct cmsghdr *__ptr;
__ptr = (FAR struct cmsghdr *)(((FAR char *)__cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
__ptr = (FAR struct cmsghdr *)
(((FAR char *)__cmsg) + CMSG_ALIGN(__cmsg->cmsg_len));
if ((unsigned long)((FAR char *)(__ptr + 1) - (FAR char *)__ctl) > __size)
{
return (FAR struct cmsghdr *)NULL;
@@ -357,7 +358,7 @@ int bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen);
int connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen);
int listen(int sockfd, int backlog);
int accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen);
int accept(int sockfd, FAR struct sockaddr *addr, FAR socklen_t *addrlen);
ssize_t send(int sockfd, FAR const void *buf, size_t len, int flags);
ssize_t sendto(int sockfd, FAR const void *buf, size_t len, int flags,
+2 -2
View File
@@ -345,7 +345,7 @@ ssize_t readlink(FAR const char *path, FAR char *buf, size_t bufsize);
#ifdef CONFIG_LIBC_EXECFUNCS
int execl(FAR const char *path, ...);
int execv(FAR const char *path, FAR char *const argv[]);
int execv(FAR const char *path, FAR char * const argv[]);
#endif
/* Byte operations */
@@ -354,7 +354,7 @@ void swab(FAR const void *src, FAR void *dest, ssize_t nbytes);
/* getopt and friends */
int getopt(int argc, FAR char *const argv[], FAR const char *optstring);
int getopt(int argc, FAR char * const argv[], FAR const char *optstring);
/* Accessor functions intended for use only by external NXFLAT
* modules. The global variables optarg, optind, and optopt cannot
+5 -18
View File
@@ -53,6 +53,7 @@
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* <wchar.h> defines the following macro names:
*
* WCHAR_MAX
@@ -143,6 +144,7 @@ extern "C"
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/* "The <wchar.h> header declares the following as functions and may also
* define them as macros. Function prototypes must be provided for use with
* an ISO C compiler."
@@ -153,18 +155,6 @@ extern "C"
wint_t btowc(int);
int fwprintf(FILE *, FAR const wchar_t *, ...);
int fwscanf(FILE *, FAR const wchar_t *, ...);
int iswalnum(wint_t);
int iswalpha(wint_t);
int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswprint(wint_t);
int iswpunct(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
int iswctype(wint_t, wctype_t);
wint_t fgetwc(FILE *);
FAR wchar_t *fgetws(wchar_t *, int, FILE *);
wint_t fputwc(wchar_t, FILE *);
@@ -174,8 +164,8 @@ wint_t getwc(FILE *);
wint_t getwchar(void);
int mbsinit(FAR const mbstate_t *);
size_t mbrlen(FAR const char *, size_t, FAR mbstate_t *);
size_t mbrtowc(wchar_t *, FAR const char *, size_t,
mbstate_t *);
size_t mbrtowc(FAR wchar_t *, FAR const char *, size_t,
FAR mbstate_t *);
size_t mbsnrtowcs(FAR wchar_t *, FAR const char **, size_t,
size_t, FAR mbstate_t *);
size_t mbsrtowcs(wchar_t *, FAR const char **, size_t,
@@ -184,8 +174,6 @@ wint_t putwc(wchar_t, FILE *);
wint_t putwchar(wchar_t);
int swprintf(FAR wchar_t *, size_t, FAR const wchar_t *, ...);
int swscanf(FAR const wchar_t *, FAR const wchar_t *, ...);
wint_t towlower(wint_t);
wint_t towupper(wint_t);
wint_t ungetwc(wint_t, FILE *);
int vfwprintf(FILE *, FAR const wchar_t *, va_list);
int vwprintf(FAR const wchar_t *, va_list);
@@ -228,9 +216,8 @@ unsigned long int wcstoul(FAR const wchar_t *, FAR wchar_t **, int);
unsigned long long int wcstoull(FAR const wchar_t *, FAR wchar_t **, int);
FAR wchar_t *wcswcs(FAR const wchar_t *, FAR const wchar_t *);
int wcswidth(FAR const wchar_t *, size_t);
size_t wcsxfrm(wchar_t *, FAR const wchar_t *, size_t);
size_t wcsxfrm(FAR wchar_t *, FAR const wchar_t *, size_t);
int wctob(wint_t);
wctype_t wctype(FAR const char *);
int wcwidth(wchar_t);
FAR wchar_t *wmemchr(FAR const wchar_t *, wchar_t, size_t);
int wmemcmp(FAR const wchar_t *, FAR const wchar_t *, size_t);
-1
View File
@@ -113,7 +113,6 @@ int towctrans(wint_t, wctrans_t);
wint_t towlower(wint_t);
wint_t towupper(wint_t);
wctrans_t wctrans(FAR const char *);
int iswctype(wint_t, wctype_t);
wctype_t wctype(FAR const char *);
#undef EXTERN