Changeset 669 for trunk/kernel/kern/thread.h
- Timestamp:
- Nov 19, 2020, 11:44:34 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/thread.h
r662 r669 37 37 #include <core.h> 38 38 #include <chdev.h> 39 #include <alarm.h> 39 40 #include <cluster.h> 40 41 #include <process.h> … … 95 96 #define THREAD_BLOCKED_LOCK 0x1000 /*! ANY : wait queuelock or rwlock */ 96 97 #define THREAD_BLOCKED_CLIENT 0x2000 /*! DEV : wait clients queue non empty */ 98 #define THREAD_BLOCKED_ALARM 0x4000 /*! ANY : wait a timer based alarm */ 97 99 98 100 /*************************************************************************************** … … 160 162 vseg_t * user_stack_vseg; /*! local pointer on user stack vseg */ 161 163 162 void * entry_func; /*! pointer on entry function */ 163 void * entry_args; /*! pointer on entry function arguments */ 164 uint32_t main_argc; /*! main thread number of arguments */ 165 char ** main_argv; /*! main thread array of strings arguments */ 164 void * entry_func; /*! pointer on thread entry function */ 165 void * entry_args; /*! pthread : pointer on arguments */ 166 166 167 167 uint32_t flags; /*! bit vector of flags */ … … 177 177 178 178 chdev_t * chdev; /*! chdev pointer (for a DEV thread only) */ 179 180 alarm_t alarm; /*! embedded timer based alarm */ 179 181 180 182 reg_t save_sr; /*! used by sched_yield() function */ … … 269 271 /*************************************************************************************** 270 272 * This function is called by the process_make_exec() function to re-initialise the 271 * calling thread descriptor, that will become the new process main thread .272 * It must be called by the main thread of the calling process.273 * calling thread descriptor, that will become the new process main thread, from 274 * the process descriptor, and from the <args_nr> & <args_base> arguments. 273 275 * - The calling thread TRDID is not modified. 274 276 * - The kernel stack (currently in use) is not modified. 275 * - A new user stack vseg is created and initialised. 276 * - The function calls the hal_cpu_context_exec() to re-initialize the CPU context 277 * and the uzone registered in kernel stack, an jump to user code. 278 *************************************************************************************** 279 * @ entry_func : main thread entry point. 280 * @ argc : number of main thread arguments. 281 * @ argv : array of pointers on stringarguments. 282 * @ returns 0 if success / returns ENOMEM if error. 283 **************************************************************************************/ 284 error_t thread_user_exec( void * entry_func, 285 uint32_t argc, 286 char ** argv); 277 * - It calls the hal_cpu_context_init() to re-initialize the thread CPU context. 278 * - It calls the hal_do_cpu_restore() to force execution of the new user code. 279 *************************************************************************************** 280 * @ argc : actual number of main thread arguments. 281 * @ argv : user space pointer on array of pointers on arguments. 282 **************************************************************************************/ 283 void thread_user_exec( uint32_t argc, 284 intptr_t argv ); 287 285 288 286 /*************************************************************************************** … … 397 395 * @ is_forced : the deletion does not depends on the attached mode. 398 396 **************************************************************************************/ 399 void thread_delete ( xptr_t thread_xp,400 bool_t is_forced );397 void thread_delete_request( xptr_t thread_xp, 398 bool_t is_forced ); 401 399 402 400 /***************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.