@@ -81,22 +81,12 @@ static inline int close (int fd) {
81
81
return (int )syscall1 (__NR_close , (long )fd );
82
82
}
83
83
84
- static inline long lseek (int fd , off_t offset , int whence ) {
85
- return syscall3 (__NR_lseek , (long )fd , (long )offset , (long )whence );
86
- }
87
-
88
- static inline int getrlimit (int resource , rlimit_t * rlim ) {
89
- return (int )syscall2 (__NR_getrlimit , (long )resource , (long )rlim );
90
- }
91
-
92
- static inline int pread64 (int fd , void * buf , size_t count , off_t offset ) {
93
- return (int )syscall4 (__NR_pread64 , (long )fd , (long )buf , (long )count , (long )offset );
84
+ static inline int stat (const char * pathname , stat_t * statbuf ) {
85
+ return (int )syscall2 (__NR_stat , (long )pathname , (long )statbuf );
94
86
}
95
87
96
- static inline void exit (int status )
97
- {
98
- syscall1 (__NR_exit , (long )status );
99
- __builtin_unreachable ();
88
+ static inline long lseek (int fd , off_t offset , int whence ) {
89
+ return syscall3 (__NR_lseek , (long )fd , (long )offset , (long )whence );
100
90
}
101
91
102
92
static inline void * mmap (
@@ -122,22 +112,31 @@ static inline int munmap(void* addr, uint64_t len) {
122
112
return (int )syscall2 (__NR_munmap , (long )addr , (long )len );
123
113
}
124
114
125
- static inline int getcwd ( char * buf , size_t size ) {
126
- return (int )syscall2 ( __NR_getcwd , (long )buf , (long )size );
115
+ static inline int pread64 ( int fd , void * buf , size_t count , off_t offset ) {
116
+ return (int )syscall4 ( __NR_pread64 , (long )fd , ( long ) buf , (long )count , ( long ) offset );
127
117
}
128
118
129
- static inline int stat ( const char * pathname , stat_t * statbuf ) {
130
- return (int )syscall2 ( __NR_stat , (long )pathname , (long )statbuf );
119
+ static inline int execve ( char * pathname , char * * argv , char * * envp ) {
120
+ return (int )syscall3 ( __NR_execve , (long )pathname , (long )argv , ( long ) envp );
131
121
}
132
122
133
- static inline long getrandom (void * buf , size_t buflen , unsigned int flags ) {
134
- return (long )syscall3 (__NR_getrandom , (long )buf , (long )buflen , (long )flags );
123
+ static inline void exit (int status ) {
124
+ syscall1 (__NR_exit , (long )status );
125
+ __builtin_unreachable ();
135
126
}
136
127
137
- static inline int execve (char * pathname , char * * argv , char * * envp ) {
138
- return (int )syscall3 ( __NR_execve , (long )pathname , (long )argv , ( long ) envp );
128
+ static inline int getcwd (char * buf , size_t size ) {
129
+ return (int )syscall2 ( __NR_getcwd , (long )buf , (long )size );
139
130
}
140
131
141
132
static inline long readlink (const char * pathname , char * buf , size_t bufsiz ) {
142
133
return syscall3 (__NR_readlink , (long )pathname , (long )buf , (long )bufsiz );
143
134
}
135
+
136
+ static inline int getrlimit (int resource , rlimit_t * rlim ) {
137
+ return (int )syscall2 (__NR_getrlimit , (long )resource , (long )rlim );
138
+ }
139
+
140
+ static inline long getrandom (void * buf , size_t buflen , unsigned int flags ) {
141
+ return (long )syscall3 (__NR_getrandom , (long )buf , (long )buflen , (long )flags );
142
+ }
0 commit comments