Changes between Version 5 and Version 6 of kernel_syscalls
- Timestamp:
- Oct 23, 2014, 3:58:35 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
kernel_syscalls
v5 v6 8 8 but some services are provided by the kernel itself: 9 9 10 === void _sys_ukn() ===10 === void '''_sys_ukn'''() === 11 11 Function executed in case of undefined syscall 12 12 13 === void _proc_xyp( unsigned int* x, unsigned int*, unsigned int* p ) ===13 === void '''_proc_xyp'''( unsigned int* x, unsigned int*, unsigned int* p ) === 14 14 This function returns the processor (x,y,p) identifiers. 15 15 16 === void _task_exit() ===16 === void '''_task_exit'''() === 17 17 The calling task goes to sleeping state, after printing an exit message. 18 18 It is descheduled and enters the "not runable" mode. 19 19 20 === void _context_switch() ===20 === void '''_context_switch'''() === 21 21 This function deschedules the calling task. It mask interrupts before calling the _ctx_switch, and restore it when the task is rescheduled. 22 22 23 === unsigned int _local_task_id() ===23 === unsigned int '''_local_task_id'''() === 24 24 Returns current task local index (amongst tasks running on a given processor). 25 25 26 === unsigned int _global_task_id() ===26 === unsigned int '''_global_task_id'''() === 27 27 Returns current task global index (amongst all tasks running on all processors). 28 28 29 === unsigned int _thread_id() ===29 === unsigned int '''_thread_id'''() === 30 30 Returns current thread index (amongst all tasks in a given multi-tasks application). 31 31 32 === unsigned int _procs_number( unsigned int cluster_id, unsigned int* number ) ===32 === unsigned int '''_procs_number'''( unsigned int cluster_id, unsigned int* number ) === 33 33 Returns in buffer argument the number of processors in cluster specified by the cluster_id argument. 34 34 35 === unsigned int _get_vobj_ptr( char* vspace_name, char* vobj_name, mapping_vobj_t** pvobj ) ===35 === unsigned int '''_get_vobj_ptr'''( char* vspace_name, char* vobj_name, mapping_vobj_t** pvobj ) === 36 36 This function returns in the res_vobj argument a pointer on a vobj identified by the (vspace_name / vobj_name ) couple. 37 37 Returns 0 if success, >0 if not found 38 38 39 === unsigned int _vobj_get_vbase( char* vspace_name, char* vobj_name, unsigned int* vobj_vbase ) ===39 === unsigned int '''_vobj_get_vbase'''( char* vspace_name, char* vobj_name, unsigned int* vobj_vbase ) === 40 40 This function writes in vobj_base the virtual base address of a vobj identified by the (vspace_name / vobj_name ) couple. 41 41 Returns 0 if success, >0 if not found 42 42 43 === unsigned int _vobj_get_length( char* vspace_name, char* vobj_name, unsigned int* vobj_length ) ===43 === unsigned int '''_vobj_get_length'''( char* vspace_name, char* vobj_name, unsigned int* vobj_length ) === 44 44 This function writes in vobj_length the length of a vobj identified by the (vspace_name / vobj_name ) couple. 45 45 Returns 0 if success, >0 if not found 46 46 47 === unsigned int _get_xy_from_ptr( void* ptr, unsigned int* px, unsigned int* py ) ===47 === unsigned int '''_get_xy_from_ptr'''( void* ptr, unsigned int* px, unsigned int* py ) === 48 48 This function returns in the (x,y) arguments the coordinates of the cluster where is mapped the ptr virtual address. It use the _get_context_slot() function to get the calling task page table, and uses the _v2p_translate() function to obtain the physical address. Returns 0 if success, > 0 if ptr not mapped in the calling task vspace. 49 49