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

📄 unistd.h

📁 嵌入式系统设计与实例开发源码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define __NR_readdir            204 /* Linux Specific                              */#define __NR_readahead          205 /* Linux Specific                              */#define __NR_socketcall         206 /* Linux Specific                              */#define __NR_syslog             207 /* Linux Specific                              *//* #define __NR_olduname        208    Linux Specific                              *//* #define __NR_iopl            209    Linux Specific - i386 specific, unused      *//* #define __NR_idle            210    Linux Specific - was sys_idle, now unused   *//* #define __NR_vm86            211    Linux Specific - i386 specific, unused      */#define __NR_waitpid            212 /* Linux Specific                              */#define __NR_swapoff            213 /* Linux Specific                              */#define __NR_sysinfo            214 /* Linux Specific                              */#define __NR_ipc                215 /* Linux Specific                              */#define __NR_sigreturn          216 /* Linux Specific                              */#define __NR_clone              217 /* Linux Specific                              *//* #define __NR_modify_ldt      218    Linux Specific - i386 specific, unused      */#define __NR_adjtimex           219 /* Linux Specific                              */#define __NR_sigprocmask        220 /* Linux Specific                              */#define __NR_create_module      221 /* Linux Specific                              */#define __NR_delete_module      222 /* Linux Specific                              */#define __NR_get_kernel_syms    223 /* Linux Specific                              */#define __NR_getpgid            224 /* Linux Specific                              */#define __NR_bdflush            225 /* Linux Specific                              */#define __NR_sysfs              226 /* Linux Specific                              */#define __NR_afs_syscall        227 /* Linux Specific                              */#define __NR_setfsuid           228 /* Linux Specific                              */#define __NR_setfsgid           229 /* Linux Specific                              */#define __NR__newselect         230 /* Linux Specific                              */#define __NR_time               231 /* Linux Specific                              *//* #define __NR_oldstat         232    Linux Specific                              */#define __NR_stime              233 /* Linux Specific                              *//* #define __NR_oldfstat        234    Linux Specific                              *//* #define __NR_phys            235    Linux Specific                              */#define __NR__llseek            236 /* Linux Specific                              */#define __NR_mlock              237#define __NR_munlock            238#define __NR_mlockall           239#define __NR_munlockall         240#define __NR_sched_setparam     241#define __NR_sched_getparam     242#define __NR_sched_setscheduler 243#define __NR_sched_getscheduler 244#define __NR_sched_yield        245#define __NR_sched_get_priority_max 246#define __NR_sched_get_priority_min 247#define __NR_sched_rr_get_interval  248#define __NR_nanosleep          249#define __NR_mremap             250#define __NR__sysctl            251#define __NR_getsid             252#define __NR_fdatasync          253#define __NR_nfsservctl         254#define __NR_aplib              255#define _syscall0(type,name) \type name(void) \{ \long __res; \register long __g1 __asm__ ("g1") = __NR_##name; \__asm__ __volatile__ ("t 0x10\n\t" \		      "bcc 1f\n\t" \		      "mov %%o0, %0\n\t" \		      "sub %%g0, %%o0, %0\n\t" \		      "1:\n\t" \		      : "=r" (__res)\		      : "r" (__g1) \		      : "o0", "cc"); \if (__res < -255 || __res >= 0) \    return (type) __res; \errno = -__res; \return -1; \}#define _syscall1(type,name,type1,arg1) \type name(type1 arg1) \{ \long __res; \register long __g1 __asm__ ("g1") = __NR_##name; \register long __o0 __asm__ ("o0") = (long)(arg1); \__asm__ __volatile__ ("t 0x10\n\t" \		      "bcc 1f\n\t" \		      "mov %%o0, %0\n\t" \		      "sub %%g0, %%o0, %0\n\t" \		      "1:\n\t" \		      : "=r" (__res), "=&r" (__o0) \		      : "1" (__o0), "r" (__g1) \		      : "cc"); \if (__res < -255 || __res >= 0) \	return (type) __res; \errno = -__res; \return -1; \}#define _syscall2(type,name,type1,arg1,type2,arg2) \type name(type1 arg1,type2 arg2) \{ \long __res; \register long __g1 __asm__ ("g1") = __NR_##name; \register long __o0 __asm__ ("o0") = (long)(arg1); \register long __o1 __asm__ ("o1") = (long)(arg2); \__asm__ __volatile__ ("t 0x10\n\t" \		      "bcc 1f\n\t" \		      "mov %%o0, %0\n\t" \		      "sub %%g0, %%o0, %0\n\t" \		      "1:\n\t" \		      : "=r" (__res), "=&r" (__o0) \		      : "1" (__o0), "r" (__o1), "r" (__g1) \		      : "cc"); \if (__res < -255 || __res >= 0) \	return (type) __res; \errno = -__res; \return -1; \}#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \type name(type1 arg1,type2 arg2,type3 arg3) \{ \long __res; \register long __g1 __asm__ ("g1") = __NR_##name; \register long __o0 __asm__ ("o0") = (long)(arg1); \register long __o1 __asm__ ("o1") = (long)(arg2); \register long __o2 __asm__ ("o2") = (long)(arg3); \__asm__ __volatile__ ("t 0x10\n\t" \		      "bcc 1f\n\t" \		      "mov %%o0, %0\n\t" \		      "sub %%g0, %%o0, %0\n\t" \		      "1:\n\t" \		      : "=r" (__res), "=&r" (__o0) \		      : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__g1) \		      : "cc"); \if (__res < -255 || __res>=0) \	return (type) __res; \errno = -__res; \return -1; \}#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \{ \long __res; \register long __g1 __asm__ ("g1") = __NR_##name; \register long __o0 __asm__ ("o0") = (long)(arg1); \register long __o1 __asm__ ("o1") = (long)(arg2); \register long __o2 __asm__ ("o2") = (long)(arg3); \register long __o3 __asm__ ("o3") = (long)(arg4); \__asm__ __volatile__ ("t 0x10\n\t" \		      "bcc 1f\n\t" \		      "mov %%o0, %0\n\t" \		      "sub %%g0, %%o0, %0\n\t" \		      "1:\n\t" \		      : "=r" (__res), "=&r" (__o0) \		      : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__g1) \		      : "cc"); \if (__res < -255 || __res>=0) \	return (type) __res; \errno = -__res; \return -1; \} #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \	  type5,arg5) \type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \{ \long __res; \register long __g1 __asm__ ("g1") = __NR_##name; \register long __o0 __asm__ ("o0") = (long)(arg1); \register long __o1 __asm__ ("o1") = (long)(arg2); \register long __o2 __asm__ ("o2") = (long)(arg3); \register long __o3 __asm__ ("o3") = (long)(arg4); \register long __o4 __asm__ ("o4") = (long)(arg5); \__asm__ __volatile__ ("t 0x10\n\t" \		      "bcc 1f\n\t" \		      "mov %%o0, %0\n\t" \		      "sub %%g0, %%o0, %0\n\t" \		      "1:\n\t" \		      : "=r" (__res), "=&r" (__o0) \		      : "1" (__o0), "r" (__o1), "r" (__o2), "r" (__o3), "r" (__o4), "r" (__g1) \		      : "cc"); \if (__res < -255 || __res>=0) \	return (type) __res; \errno = -__res; \return -1; \}#ifdef __KERNEL_SYSCALLS__/* * we need this inline - forking from kernel space will result * in NO COPY ON WRITE (!!!), until an execve is executed. This * is no problem, but for the stack. This is handled by not letting * main() use the stack at all after fork(). Thus, no function * calls - which means inline code for fork too, as otherwise we * would use the stack upon exit from 'fork()'. * * Actually only pause and fork are needed inline, so that there * won't be any messing with the stack from main(), but we define * some others too. */#define __NR__exit __NR_exitstatic __inline__ _syscall0(int,pause)static __inline__ _syscall0(int,sync)static __inline__ _syscall0(pid_t,setsid)static __inline__ _syscall3(int,write,int,fd,__const__ char *,buf,off_t,count)static __inline__ _syscall3(int,read,int,fd,char *,buf,off_t,count)static __inline__ _syscall3(off_t,lseek,int,fd,off_t,offset,int,count)static __inline__ _syscall1(int,dup,int,fd)static __inline__ _syscall3(int,execve,__const__ char *,file,char **,argv,char **,envp)static __inline__ _syscall3(int,open,__const__ char *,file,int,flag,int,mode)static __inline__ _syscall1(int,close,int,fd)static __inline__ _syscall1(int,_exit,int,exitcode)static __inline__ _syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options)static __inline__ _syscall1(int,delete_module,const char *,name)static __inline__ pid_t wait(int * wait_stat){	return waitpid(-1,wait_stat,0);}#endif /* __KERNEL_SYSCALLS__ */#endif /* _SPARC_UNISTD_H */

⌨️ 快捷键说明

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