Changeset 677 for trunk/libs/mini-libc/unistd.h
- Timestamp:
- Nov 20, 2020, 12:18:00 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libs/mini-libc/unistd.h
r650 r677 35 35 36 36 /***************************************************************************************** 37 * This function implements the "alarm"system call.38 * sets a timer to deliver the signal SIGALRM to the calling process,37 * This function implements the <alarm> system call. 38 * It sets a timer to deliver the signal SIGALRM to the calling process, 39 39 * after the specified number of seconds. 40 40 * If an alarm has already been set with alarm() but has not been delivered, … … 49 49 50 50 /***************************************************************************************** 51 * This function implements the "chdir"system call.51 * This function implements the <chdir> system call. 52 52 * It changes the current working directory in the reference process descriptor. 53 53 ***************************************************************************************** … … 58 58 59 59 /***************************************************************************************** 60 * This function implements the "close"system call.60 * This function implements the <close> system call. 61 61 * It releases the memory allocated for the file identified by the <fd> argument, 62 62 * and remove the fd array_entry in all process descriptor copies. … … 68 68 69 69 /***************************************************************************************** 70 * This function implement the "exec"system call.70 * This function implement the <exec> system call. 71 71 * It creates, in the same cluster as the calling thread, a new process descriptor, 72 72 * and a new associated main thread descriptor, executing a new memory image defined … … 78 78 * as defined by the <arv> argument, and the new process environment variables, 79 79 * as defined by the <envp> argument. 80 * TODO : the < argv> and <envp> arguments are not supported yet (bothmust be NULL).80 * TODO : the <envs> argument is not supported yet (must be NULL). 81 81 ***************************************************************************************** 82 82 * @ filename : string pointer on .elf filename (virtual pointer in user space) 83 * @ arg v : array of strings on process arguments (virtual pointers in user space)84 * @ env p : array of strings on environment variables (virtual pointers in user space)83 * @ args : array of pointers on process arguments (strings in user space) 84 * @ envs : array of pointers on environment variables (strings in user space) 85 85 * @ does not return if success / returns -1 if failure. 86 86 ****************************************************************************************/ 87 87 int execve( char * filename, 88 char ** arg v,89 char ** env p);90 91 /***************************************************************************************** 92 * This function implement the "fork"system call.88 char ** args, 89 char ** envs ); 90 91 /***************************************************************************************** 92 * This function implement the <fork> system call. 93 93 * The calling process descriptor (parent process), and the associated thread descriptor 94 94 * are replicated in a - likely - remote cluster, that becomes the new process owner. … … 106 106 107 107 /***************************************************************************************** 108 * This function implements the "fsync"system call.108 * This function implements the <fsync> system call. 109 109 * It causes all the modified data and attributes of file identified by the <fd> argument 110 110 * to be copied from the file mapper and file descriptor to the IOC device. … … 116 116 117 117 /***************************************************************************************** 118 * This function implements the "getcwd"system call.118 * This function implements the <getcwd> system call. 119 119 * It returns the pathname of the current working directory. 120 120 ***************************************************************************************** … … 127 127 128 128 /***************************************************************************************** 129 * This function implements the "getpid"system call.129 * This function implements the <getpid> system call. 130 130 * It returns the process identifier. 131 131 ***************************************************************************************** … … 135 135 136 136 /***************************************************************************************** 137 * This function implements the "isatty"system call.137 * This function implements the <isatty> system call. 138 138 * It test whether a file descriptor refers to a terminal. 139 139 ***************************************************************************************** … … 144 144 145 145 /***************************************************************************************** 146 * This function implements the "lseek"system call.146 * This function implements the <lseek> system call. 147 147 * It repositions the offset of the file descriptor identified by <fd>, 148 148 * according to the operation type defined by the <whence> argument. … … 158 158 159 159 /***************************************************************************************** 160 * This function implements the "pause"system call.160 * This function implements the <pause> system call. 161 161 * It stops the calling process until a signal is received. 162 162 ***************************************************************************************** … … 166 166 167 167 /***************************************************************************************** 168 * This function implements the "pipe"system call.168 * This function implements the <pipe> system call. 169 169 * It creates in the calling thread cluster an unnamed pipe, and two (read and write) 170 170 * file descriptors to access this pipe. The argument is a pointer a fd[] array. 171 * TODO not implemented yet... 172 ***************************************************************************************** 173 * @ fd[0] : [out] read only file descriptor index. 174 * @ fd[1] : [out] write only file descriptor index. 171 ***************************************************************************************** 172 * @ fd[0] : [out] buffer for read only file descriptor index. 173 * @ fd[1] : [out] buffer for write only file descriptor index. 175 174 * @ return 0 if success / return -1 if failure. 176 175 ****************************************************************************************/ … … 178 177 179 178 /***************************************************************************************** 180 * This function implements the "read"system call.179 * This function implements the <read> system call. 181 180 * It reads bytes from an open file identified by the <fd> file descriptor. 182 181 * This file can be a regular file or a character oriented device. 183 182 ***************************************************************************************** 184 * @ fd : openfile index in fd_array.183 * @ fd : file index in fd_array. 185 184 * @ buf : buffer virtual address in user space. 186 185 * @ count : number of bytes. … … 192 191 193 192 /***************************************************************************************** 194 * This function implements the "rmdir"system call.193 * This function implements the <rmdir> system call. 195 194 * It removes a directory file whose name is given by <pathname>. 196 195 * The directory must not contain any entries other than `.' and `..'. … … 202 201 203 202 /***************************************************************************************** 204 * This function implements the "sync"system call.203 * This function implements the <sync> system call. 205 204 * It forces all kernel mappers (file caches) to be copied to the IOC device. 206 205 ****************************************************************************************/ … … 208 207 209 208 /***************************************************************************************** 210 * This function implements the "unlink"system call.209 * This function implements the <unlink> system call. 211 210 * It removes a directory entry identified by the <pathname> from the parent directory, 212 211 * and decrement the link count of the file referenced by the link. … … 222 221 223 222 /***************************************************************************************** 224 * This function implements the "write"system call.223 * This function implements the <write> system call. 225 224 * It writes bytes to an open file identified by the <fd> file descriptor. 226 225 * This file can be a regular file or character oriented device. 227 226 ***************************************************************************************** 228 * @ fd : openfile index in fd_array.227 * @ fd : file index in fd_array. 229 228 * @ buf : buffer virtual address in user space. 230 229 * @ count : number of bytes.
Note: See TracChangeset
for help on using the changeset viewer.