⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 book.t

📁 操作系统设计与实现源码
💻 T
📖 第 1 页 / 共 5 页
字号:
.Op 5 include/errno.h00280	#define EBADMODE      (_SIGN 53)  /* badmode in ioctl */00281	#define EWOULDBLOCK   (_SIGN 54)00282	#define EBADDEST      (_SIGN 55)  /* not a valid destination address */00283	#define EDSTNOTRCH    (_SIGN 56)  /* destination not reachable */00284	#define EISCONN       (_SIGN 57)  /* all ready connected */00285	#define EADDRINUSE    (_SIGN 58)  /* address in use */00286	#define ECONNREFUSED  (_SIGN 59)  /* connection refused */00287	#define ECONNRESET    (_SIGN 60)  /* connection reset */00288	#define ETIMEDOUT     (_SIGN 61)  /* connection timed out */00289	#define EURG          (_SIGN 62)  /* urgent data present */00290	#define ENOURG        (_SIGN 63)  /* no urgent data present */00291	#define ENOTCONN      (_SIGN 64)  /* no connection (yet or anymore) */00292	#define ESHUTDOWN     (_SIGN 65)  /* a write call to a shutdown connection */00293	#define ENOCONN       (_SIGN 66)  /* no such connection */00294	00295	/* The following are not POSIX errors, but they can still happen. */00296	#define ELOCKED      (_SIGN 101)  /* can't send message */00297	#define EBADCALL     (_SIGN 102)  /* error on send/receive */00298	00299	/* The following error codes are generated by the kernel itself. */00300	#ifdef _SYSTEM00301	#define E_BAD_DEST     -1001    /* destination address illegal */00302	#define E_BAD_SRC      -1002    /* source address illegal */00303	#define E_TRY_AGAIN    -1003    /* can't send-- tables full */00304	#define E_OVERRUN      -1004    /* interrupt for task that is not waiting */00305	#define E_BAD_BUF      -1005    /* message buf outside caller's addr space */00306	#define E_TASK         -1006    /* can't send to task */00307	#define E_NO_MESSAGE   -1007    /* RECEIVE failed: no message present */00308	#define E_NO_PERM      -1008    /* ordinary users can't send to tasks */00309	#define E_BAD_FCN      -1009    /* only valid fcns are SEND, RECEIVE, BOTH */00310	#define E_BAD_ADDR     -1010    /* bad address given to utility routine */00311	#define E_BAD_PROC     -1011    /* bad proc number given to utility */00312	#endif /* _SYSTEM */00313	00314	#endif /* _ERRNO_H */++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++				include/unistd.h	 	 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++00400	/* The <unistd.h> header contains a few miscellaneous manifest constants. */00401	00402	#ifndef _UNISTD_H00403	#define _UNISTD_H00404	00405	/* POSIX requires size_t and ssize_t in <unistd.h> and elsewhere. */00406	#ifndef _SIZE_T00407	#define _SIZE_T00408	typedef unsigned int size_t;00409	#endif00410	00411	#ifndef _SSIZE_T00412	#define _SSIZE_T00413	typedef int ssize_t;00414	#endif.Ep 6 include/unistd.h00415	00416	/* Values used by access().  POSIX Table 2-8. */00417	#define F_OK               0    /* test if file exists */00418	#define X_OK               1    /* test if file is executable */00419	#define W_OK               2    /* test if file is writable */00420	#define R_OK               4    /* test if file is readable */00421	00422	/* Values used for whence in lseek(fd, offset, whence).  POSIX Table 2-9. */00423	#define SEEK_SET           0    /* offset is absolute  */00424	#define SEEK_CUR           1    /* offset is relative to current position */00425	#define SEEK_END           2    /* offset is relative to end of file */00426	00427	/* This value is required by POSIX Table 2-10. */00428	#define _POSIX_VERSION 199009L  /* which standard is being conformed to */00429	00430	/* These three definitions are required by POSIX Sec. 8.2.1.2. */00431	#define STDIN_FILENO       0    /* file descriptor for stdin */00432	#define STDOUT_FILENO      1    /* file descriptor for stdout */00433	#define STDERR_FILENO      2    /* file descriptor for stderr */00434	00435	#ifdef _MINIX00436	/* How to exit the system. */00437	#define RBT_HALT           000438	#define RBT_REBOOT         100439	#define RBT_PANIC          2    /* for servers */00440	#define RBT_MONITOR        3    /* let the monitor do this */00441	#define RBT_RESET          4    /* hard reset the system */00442	#endif00443	00444	/* NULL must be defined in <unistd.h> according to POSIX Sec. 2.7.1. */00445	#define NULL    ((void *)0)00446	00447	/* The following relate to configurable system variables. POSIX Table 4-2. */00448	#define _SC_ARG_MAX             100449	#define _SC_CHILD_MAX           200450	#define _SC_CLOCKS_PER_SEC      300451	#define _SC_CLK_TCK             300452	#define _SC_NGROUPS_MAX         400453	#define _SC_OPEN_MAX            500454	#define _SC_JOB_CONTROL         600455	#define _SC_SAVED_IDS           700456	#define _SC_VERSION             800457	#define _SC_STREAM_MAX          900458	#define _SC_TZNAME_MAX         1000459	00460	/* The following relate to configurable pathname variables. POSIX Table 5-2. */00461	#define _PC_LINK_MAX            1       /* link count */00462	#define _PC_MAX_CANON           2       /* size of the canonical input queue */00463	#define _PC_MAX_INPUT           3       /* type-ahead buffer size */00464	#define _PC_NAME_MAX            4       /* file name size */00465	#define _PC_PATH_MAX            5       /* pathname size */00466	#define _PC_PIPE_BUF            6       /* pipe size */00467	#define _PC_NO_TRUNC            7       /* treatment of long name components */00468	#define _PC_VDISABLE            8       /* tty disable */00469	#define _PC_CHOWN_RESTRICTED    9       /* chown restricted or not */00470	00471	/* POSIX defines several options that may be implemented or not, at the00472	 * implementer's whim.  This implementer has made the following choices:00473	 *00474	 * _POSIX_JOB_CONTROL       not defined:        no job control.Op 7 include/unistd.h00475	 * _POSIX_SAVED_IDS         not defined:        no saved uid/gid00476	 * _POSIX_NO_TRUNC          defined as -1:      long path names are truncated00477	 * _POSIX_CHOWN_RESTRICTED  defined:            you can't give away files00478	 * _POSIX_VDISABLE          defined:            tty functions can be disabled00479	 */00480	#define _POSIX_NO_TRUNC       (-1)00481	#define _POSIX_CHOWN_RESTRICTED  100482	00483	/* Function Prototypes. */00484	#ifndef _ANSI_H00485	#include <ansi.h>00486	#endif00487	00488	_PROTOTYPE( void _exit, (int _status)                                   );00489	_PROTOTYPE( int access, (const char *_path, int _amode)                 );00490	_PROTOTYPE( unsigned int alarm, (unsigned int _seconds)                 );00491	_PROTOTYPE( int chdir, (const char *_path)                              );00492	_PROTOTYPE( int chown, (const char *_path, Uid_t _owner, Gid_t _group)  );00493	_PROTOTYPE( int close, (int _fd)                                        );00494	_PROTOTYPE( char *ctermid, (char *_s)                                   );00495	_PROTOTYPE( char *cuserid, (char *_s)                                   );00496	_PROTOTYPE( int dup, (int _fd)                                          );00497	_PROTOTYPE( int dup2, (int _fd, int _fd2)                               );00498	_PROTOTYPE( int execl, (const char *_path, const char *_arg, ...)       );00499	_PROTOTYPE( int execle, (const char *_path, const char *_arg, ...)      );00500	_PROTOTYPE( int execlp, (const char *_file, const char *arg, ...)       );00501	_PROTOTYPE( int execv, (const char *_path, char *const _argv[])         );00502	_PROTOTYPE( int execve, (const char *_path, char *const _argv[], 00503	                                                char *const _envp[])    );00504	_PROTOTYPE( int execvp, (const char *_file, char *const _argv[])        );00505	_PROTOTYPE( pid_t fork, (void)                                          );00506	_PROTOTYPE( long fpathconf, (int _fd, int _name)                        );00507	_PROTOTYPE( char *getcwd, (char *_buf, size_t _size)                    );00508	_PROTOTYPE( gid_t getegid, (void)                                       );00509	_PROTOTYPE( uid_t geteuid, (void)                                       );00510	_PROTOTYPE( gid_t getgid, (void)                                        );00511	_PROTOTYPE( int getgroups, (int _gidsetsize, gid_t _grouplist[])        );00512	_PROTOTYPE( char *getlogin, (void)                                      );00513	_PROTOTYPE( pid_t getpgrp, (void)                                       );00514	_PROTOTYPE( pid_t getpid, (void)                                        );00515	_PROTOTYPE( pid_t getppid, (void)                                       );00516	_PROTOTYPE( uid_t getuid, (void)                                        );00517	_PROTOTYPE( int isatty, (int _fd)                                       );00518	_PROTOTYPE( int link, (const char *_existing, const char *_new)         );00519	_PROTOTYPE( off_t lseek, (int _fd, off_t _offset, int _whence)          );00520	_PROTOTYPE( long pathconf, (const char *_path, int _name)               );00521	_PROTOTYPE( int pause, (void)                                           );00522	_PROTOTYPE( int pipe, (int _fildes[2])                                  );00523	_PROTOTYPE( ssize_t read, (int _fd, void *_buf, size_t _n)              );00524	_PROTOTYPE( int rmdir, (const char *_path)                              );00525	_PROTOTYPE( int setgid, (Gid_t _gid)                                    );00526	_PROTOTYPE( int setpgid, (pid_t _pid, pid_t _pgid)                      );00527	_PROTOTYPE( pid_t setsid, (void)                                        );00528	_PROTOTYPE( int setuid, (Uid_t _uid)                                    );00529	_PROTOTYPE( unsigned int sleep, (unsigned int _seconds)                 );00530	_PROTOTYPE( long sysconf, (int _name)                                   );00531	_PROTOTYPE( pid_t tcgetpgrp, (int _fd)                                  );00532	_PROTOTYPE( int tcsetpgrp, (int _fd, pid_t _pgrp_id)                    );00533	_PROTOTYPE( char *ttyname, (int _fd)                                    );00534	_PROTOTYPE( int unlink, (const char *_path)                             );.Ep 8 include/unistd.h00535	_PROTOTYPE( ssize_t write, (int _fd, const void *_buf, size_t _n)       );00536	00537	#ifdef _MINIX00538	_PROTOTYPE( int brk, (char *_addr)                                      );00539	_PROTOTYPE( int chroot, (const char *_name)                             );00540	_PROTOTYPE( int mknod, (const char *_name, Mode_t _mode, Dev_t _addr)   );00541	_PROTOTYPE( int mknod4, (const char *_name, Mode_t _mode, Dev_t _addr,00542	            long _size)                                                 );00543	_PROTOTYPE( char *mktemp, (char *_template)                             );00544	_PROTOTYPE( int mount, (char *_spec, char *_name, int _flag)            );00545	_PROTOTYPE( long ptrace, (int _req, pid_t _pid, long _addr, long _data) );00546	_PROTOTYPE( char *sbrk, (int _incr)                                     );00547	_PROTOTYPE( int sync, (void)                                            );00548	_PROTOTYPE( int umount, (const char *_name)                             );00549	_PROTOTYPE( int reboot, (int _how, ...)                                 );00550	_PROTOTYPE( int gethostname, (char *_hostname, size_t _len)             );00551	_PROTOTYPE( int getdomainname, (char *_domain, size_t _len)             );00552	_PROTOTYPE( int ttyslot, (void)                                         );00553	_PROTOTYPE( int fttyslot, (int _fd)                                     );00554	_PROTOTYPE( char *crypt, (const char *_key, const char *_salt)          );00555	#endif00556	00557	#endif /* _UNISTD_H */++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++				include/string.h	 	 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++00600	/* The <string.h> header contains prototypes for the string handling 00601	 * functions.00602	 */00603	00604	#ifndef _STRING_H00605	#define _STRING_H00606	00607	#define NULL    ((void *)0)00608	00609	#ifndef _SIZE_T00610	#define _SIZE_T00611	typedef unsigned int size_t;    /* type returned by sizeof */00612	#endif /*_SIZE_T */00613	00614	/* Function Prototypes. */00615	#ifndef _ANSI_H00616	#include <ansi.h>00617	#endif00618	00619	_PROTOTYPE( void *memchr, (const void *_s, int _c, size_t _n)           );00620	_PROTOTYPE( int memcmp, (const void *_s1, const void *_s2, size_t _n)   );00621	_PROTOTYPE( void *memcpy, (void *_s1, const void *_s2, size_t _n)       );00622	_PROTOTYPE( void *memmove, (void *_s1, const void *_s2, size_t _n)      );00623	_PROTOTYPE( void *memset, (void *_s, int _c, size_t _n)                 );00624	_PROTOTYPE( char *strcat, (char *_s1, const char *_s2)                  );00625	_PROTOTYPE( char *strchr, (const char *_s, int _c)                      );00626	_PROTOTYPE( int strncmp, (const char *_s1, const char *_s2, size_t _n)  );00627	_PROTOTYPE( int strcmp, (const char *_s1, const char *_s2)              );00628	_PROTOTYPE( int strcoll, (const char *_s1, const char *_s2)             );00629	_PROTOTYPE( char *strcpy, (char *_s1, const char *_s2)                  );.Op 9 include/string.h00630	_PROTOTYPE( size_t strcspn, (const char *_s1, const char *_s2)          );00631	_PROTOTYPE( char *strerror, (int _errnum)                               );00632	_PROTOTYPE( size_t strlen, (const char *_s)                             );00633	_PROTOTYPE( char *strncat, (char *_s1, const char *_s2, size_t _n)      );00634	_PROTOTYPE( char *strncpy, (char *_s1, const char *_s2, size_t _n)      );00635	_PROTOTYPE( char *strpbrk, (const char *_s1, const char *_s2)           );00636	_PROTOTYPE( char *strrchr, (const char *_s, int _c)                     );00637	_PROTOTYPE( size_t strspn, (const char *_s1, const char *_s2)           );00638	_PROTOTYPE( char *strstr, (const char *_s1, const char *_s2)            );00639	_PROTOTYPE( char *strtok, (char *_s1, const char *_s2)                  );00640	_PROTOTYPE( size_t strxfrm, (char *_s1, const char *_s2, size_t _n)     );00641	00642	#ifdef _MINIX00643	/* For backward compatibility. */00644	_PROTOTYPE( char *index, (const char *_s, int _charwanted)              );00645	_PROTOTYPE( char *rindex, (const char *_s, int _charwanted)             );00646	_PROTOTYPE( void bcopy, (const void *_src, void *_dst, size_t _length)  );00647	_PROTOTYPE( int bcmp, (const void *_s1, const void *_s2, size_t _length));00648	_PROTOTYPE( void bzero, (void *_dst, size_t _length)                    );00649	_PROTOTYPE( void *memccpy, (char *_dst, const char *_src, int _ucharstop,00650	                                                    size_t _size)       );00651	/* BSD functions */00652	_PROTOTYPE( int strcasecmp, (const char *_s1, const char *_s2)          );00653	#endif00654	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -