550W Document
550W, a high-end OS
|
#include <common/types.h>
#include <lib/list.h>
#include <lib/string.h>
#include <os/lock.h>
#include <os/mm.h>
类 | |
struct | fd |
struct | ring_buffer |
struct | pipe |
宏定义 | |
#define | O_RDONLY 0x00 |
#define | O_WRONLY 0x01 |
#define | O_RDWR 0x02 |
#define | O_CREATE 0x40 |
#define | O_DIRECTORY 0x0200000 |
#define | AT_FDCWD -100 |
#define | AT_REMOVEDIR 0x200 /* Remove directory instead of unlinking file. */ |
#define | MAX_NAME_LEN 256 |
#define | MAX_FD 200 |
#define | RING_BUFFER_SIZE 4095 |
#define | PIPE_NUM 200 |
#define | min(x, y) ((x) < (y) ? (x) : (y)) |
类型定义 | |
typedef uint32_t | fd_num_t |
typedef uint32_t | pipe_num_t |
typedef uint64_t | dev_t |
typedef uint64_t | ino_t |
typedef uint32_t | mode_t |
typedef uint32_t | nlink_t |
typedef uint32_t | uid_t |
typedef uint32_t | gid_t |
typedef int64_t | off_t |
typedef struct fd | fd_t |
typedef struct pipe | pipe_t |
函数 | |
int | fd_table_init () |
int | fd_alloc () |
fd_t * | fd_alloc_spec (int fd) |
int | fd_free (int fd) |
fd_t * | get_fd (int fd) |
int | pipe_alloc (int *fd) |
void | ring_buffer_init (struct ring_buffer *rbuf) |
size_t | read_ring_buffer (struct ring_buffer *rbuf, uint8_t *buf, size_t size) |
size_t | write_ring_buffer (struct ring_buffer *rbuf, uint8_t *buf, size_t size) |
变量 | |
fd_t | fd_table [MAX_FD] |
pipe_t | pipe_table [PIPE_NUM] |
#define AT_FDCWD -100 |
#define AT_REMOVEDIR 0x200 /* Remove directory instead of unlinking file. */ |
#define MAX_FD 200 |
#define MAX_NAME_LEN 256 |
#define min | ( | x, | |
y | |||
) | ((x) < (y) ? (x) : (y)) |
#define O_CREATE 0x40 |
#define O_DIRECTORY 0x0200000 |
#define O_RDONLY 0x00 |
#define O_RDWR 0x02 |
#define O_WRONLY 0x01 |
#define PIPE_NUM 200 |
#define RING_BUFFER_SIZE 4095 |
typedef uint64_t dev_t |
typedef uint32_t fd_num_t |
typedef uint32_t gid_t |
typedef uint64_t ino_t |
typedef uint32_t mode_t |
typedef uint32_t nlink_t |
typedef int64_t off_t |
typedef uint32_t pipe_num_t |
typedef uint32_t uid_t |
int fd_alloc | ( | ) |
fd_t* fd_alloc_spec | ( | int | fd | ) |
int fd_free | ( | int | fd | ) |
int fd_table_init | ( | ) |
fd_t* get_fd | ( | int | fd | ) |
int pipe_alloc | ( | int * | fd | ) |
size_t read_ring_buffer | ( | struct ring_buffer * | rbuf, |
uint8_t * | buf, | ||
size_t | size | ||
) |
void ring_buffer_init | ( | struct ring_buffer * | rbuf | ) |
size_t write_ring_buffer | ( | struct ring_buffer * | rbuf, |
uint8_t * | buf, | ||
size_t | size | ||
) |