Changeset 651 for trunk/kernel/syscalls/syscalls.h
- Timestamp:
- Nov 14, 2019, 11:50:09 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/syscalls/syscalls.h
r642 r651 37 37 38 38 /****************************************************************************************** 39 * [0] This function terminates the execution of the calling user thread, 40 * and makes the exit_valuepointer available to any successful pthread_join() with the39 * [0] This function terminates the execution of the calling user thread, and makes 40 * the <exit_status> pointer available to any successful pthread_join() with the 41 41 * terminating thread. 42 * It actually set the THREAD_SIG_EXIT signal, set the THREAD_BLOCKED_GLOBAL bit in the 43 * thread descriptor and deschedule. 44 * The thread will be detached from its process, and the memory allocated to the thread 45 * descriptor will be released later by the scheduler. 46 ****************************************************************************************** 47 * @ exit_vallue : pointer to be returned to joining thread if thread is attached. 42 * - If the calling thread is the main thread, it calls the sys_exit() function to delete 43 * completely the user process. 44 * - if the calling thread is not the main thread, it registers the <exit_status> pointer 45 * in the thread descriptor, and calls the thread_delete() function, that will set the 46 * THREAD_SIG_EXIT signal, set the THREAD_BLOCKED_GLOBAL bit in thread descriptor, and 47 * deschedules. All memory allocated to the thread is released later by the scheduler. 48 * If the thread is in "detached" mode, the thread_delete() function implements 49 * the synchonisation with the joining thread. 50 ****************************************************************************************** 51 * @ exit_status : pointer to be returned to joining thread if thread is attached. 48 52 * @ return 0 if success / return -1 if all locks not released or illegal argument. 49 53 *****************************************************************************************/ 50 int sys_thread_exit( void * exit_ value);54 int sys_thread_exit( void * exit_status ); 51 55 52 56 /****************************************************************************************** … … 222 226 ****************************************************************************************** 223 227 * @ attr : pointer on attributes structure. 224 * @ return 0 if success / return-1 if failure.228 * @ returns 0 if success / returns -1 if failure. 225 229 *****************************************************************************************/ 226 230 int sys_mmap( mmap_attr_t * attr ); … … 234 238 * @ buf : buffer virtual address in user space. 235 239 * @ count : number of bytes. 236 * @ return number of bytes actually read if success / returns -1 if failure.240 * @ returns number of bytes actually read if success / returns -1 if failure. 237 241 *****************************************************************************************/ 238 242 int sys_read( uint32_t file_id, … … 251 255 * @ buf : buffer virtual address in user space. 252 256 * @ count : number of bytes. 253 * @ return number of bytes actually written if success / returns -1 if failure.257 * @ returns number of bytes actually written if success / returns -1 if failure. 254 258 *****************************************************************************************/ 255 259 int sys_write( uint32_t file_id, … … 258 262 259 263 /****************************************************************************************** 260 * [16] This function repositions the offset of the file descriptor identified by <file_id>,261 * according to the operation type defined by the <whence> argument.264 * [16] This function repositions the offset of the file descriptor identified by the 265 * <file_id> argument, according to the operation type defined by the <whence> argument. 262 266 ****************************************************************************************** 263 267 * @ file_id : open file index in fd_array. 264 268 * @ offset : used to compute new offset value. 265 269 * @ whence : operation type (see below). 266 * @ return 0if success / returns -1 if failure.270 * @ returns new offset value if success / returns -1 if failure. 267 271 *****************************************************************************************/ 268 272 int sys_lseek( xptr_t file_id, … … 276 280 ****************************************************************************************** 277 281 file_id : file descriptor index in fd_array. 278 * @ return 0 if success / returns -1 if failure.282 * @ returns 0 if success / returns -1 if failure. 279 283 *****************************************************************************************/ 280 284 int sys_close( uint32_t file_id ); … … 289 293 ****************************************************************************************** 290 294 * @ pathname : pathname (can be relative or absolute). 291 * @ return 0 if success / returns -1 if failure.295 * @ returns 0 if success / returns -1 if failure. 292 296 *****************************************************************************************/ 293 297 int sys_unlink( char * pathname );
Note: See TracChangeset
for help on using the changeset viewer.