Changeset 679 for trunk/hal/generic
- Timestamp:
- Nov 20, 2020, 12:30:31 AM (4 years ago)
- Location:
- trunk/hal/generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/generic/hal_context.h
r654 r679 2 2 * hal_context.h - Generic Thread Context Access API definition. 3 3 * 4 * Author Alain Greiner (2016,2017,2018,2019 )4 * Author Alain Greiner (2016,2017,2018,2019,2020) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites … … 50 50 /**************************************************************************************** 51 51 * This function initializes the CPU context of the thread identified by the <thread> 52 * argument. All slots required to start a new thread must be initialized. 52 * argument from the <thread> descriptor, depending on the thread type (user / kernel). 53 * All slots required to start a new thread must be initialized in the thread context. 54 * Moreover, for an user thread, the arguments to be passed to the entry function 55 * depend on the <is_main> argument below: 56 * - a main thread, created by sys_exec(), requires two arguments, defined by the two 57 * <argc> and <argv> arguments below. 58 * define the arguments 59 * - a pthread, created by sys_thread_create() requires only one argument, defined by 60 * the "entry_args" field in the thread descriptor. 53 61 **************************************************************************************** 54 62 * @ thread : pointer on the thread descriptor. 63 * @ is_main : main thread when non zero. 64 * @ argc : actual number of arguments (for main). 65 * @ argv : user space pointer on array of pointers on strings arguments (for main). 55 66 ***************************************************************************************/ 56 void hal_cpu_context_init( struct thread_s * thread ); 67 void hal_cpu_context_init( struct thread_s * thread, 68 bool_t is_main, 69 uint32_t argc, 70 intptr_t argv ); 57 71 58 72 /**************************************************************************************** … … 75 89 ***************************************************************************************/ 76 90 void hal_cpu_context_fork( xptr_t thread_xp ); 77 78 /****************************************************************************************79 * This function is used to implement the exec() system call.80 * 1) It initialize the relevant slots of the the calling thread CPU context.81 * 2) It call the hal_do_cpu_restore() function to return to user mode and start82 * execution of the new process.83 ****************************************************************************************84 * @ thread : pointer on the thread descriptor.85 ***************************************************************************************/86 void hal_cpu_context_exec( struct thread_s * thread );87 91 88 92 /**************************************************************************************** -
trunk/hal/generic/hal_special.h
r625 r679 66 66 67 67 /***************************************************************************************** 68 * This function returns the current value of the hardware cycles counter.68 * This low level function returns the current value of the hardware cycles counter. 69 69 * This cycle counter is reset when the core is initialised (at each boot). 70 70 ****************************************************************************************/ -
trunk/hal/generic/hal_uspace.h
r658 r679 95 95 /***************************************************************************************** 96 96 * This function returns the length of a string located in user space. 97 * This length does NOT include the terminating NUL character. 97 98 ***************************************************************************************** 98 * @ string : string in user space.99 * @ string : string pointer in user space. 99 100 * @ return length of the string. 100 101 ****************************************************************************************/ -
trunk/hal/generic/hal_vmm.h
r635 r679 2 2 * hal_vmm.h - Kernel Virtual Memory Manager initialisation 3 3 * 4 * Authors Alain Greiner (2016,2017,2018,2019 )4 * Authors Alain Greiner (2016,2017,2018,2019,2020) 5 5 * 6 6 * Copyright (c) UPMC Sorbonne Universites
Note: See TracChangeset
for help on using the changeset viewer.