Merge remote-tracking branch 'remotes/rtt_github/master'

This commit is contained in:
liukangcc
2021-09-17 15:03:14 +08:00
1386 changed files with 674550 additions and 13527 deletions
@@ -235,4 +235,6 @@ struct winsize {
#define SIOCDEVPRIVATE 0x89F0
#define SIOCPROTOPRIVATE 0x89E0
int ioctl(int fildes, int cmd, ...);
#endif
@@ -1,49 +0,0 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-07-21 Meco Man The first version
*/
#ifndef __SYS_SELECT_H__
#define __SYS_SELECT_H__
#include <rtconfig.h>
#include <sys/types.h>
#ifndef FD_SETSIZE
#define FD_SETSIZE 32
#endif
#ifdef SAL_USING_POSIX
#ifdef FD_SETSIZE
#undef FD_SETSIZE
#endif
#define FD_SETSIZE DFS_FD_MAX
#endif /* SAL_USING_POSIX */
#define NBBY 8 /* number of bits in a byte */
typedef long fd_mask;
#define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
#ifndef howmany
#define howmany(x,y) (((x)+((y)-1))/(y))
#endif
#ifndef _SYS_TYPES_FD_SET /* MIPS */
typedef struct _types_fd_set {
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
} _types_fd_set;
#define fd_set _types_fd_set
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
#define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p)))
#endif /* _SYS_TYPES_FD_SET */
#endif /* __SYS_SELECT_H__ */
@@ -6,16 +6,19 @@
* Change Logs:
* Date Author Notes
*/
#ifndef __RTT_STATFS_H__
#define __RTT_STATFS_H__
#ifndef __SYS_STATFS_H__
#define __SYS_STATFS_H__
#include <rtthread.h>
#include <stddef.h>
struct statfs
{
rt_size_t f_bsize; /* block size */
rt_size_t f_blocks; /* total data blocks in file system */
rt_size_t f_bfree; /* free blocks in file system */
size_t f_bsize; /* block size */
size_t f_blocks; /* total data blocks in file system */
size_t f_bfree; /* free blocks in file system */
};
int statfs(const char *path, struct statfs *buf);
int fstatfs(int fd, struct statfs *buf);
#endif
+3 -3
View File
@@ -8,8 +8,8 @@
* 2020-09-07 Meco Man combine gcc armcc iccarm
* 2021-02-12 Meco Man move all definitions located in <clock_time.h> to this file
*/
#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_
#ifndef __SYS_TIME_H__
#define __SYS_TIME_H__
#include <rtconfig.h>
#include <rtdef.h>
@@ -74,7 +74,7 @@ struct timespec {
};
#endif
/* posix clock and timer */
/* POSIX clock and timer */
#define MILLISECOND_PER_SECOND 1000UL
#define MICROSECOND_PER_SECOND 1000000UL
#define NANOSECOND_PER_SECOND 1000000000UL
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-09-11 Meco Man First version
*/
#ifndef __SYS_VFS_H__
#define __SYS_VFS_H__
#include "statfs.h" /* <sys/statfs.h> */
#endif