Changeset 457 for trunk/kernel/kern/thread.h
- Timestamp:
- Aug 2, 2018, 11:47:13 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/thread.h
r446 r457 26 26 #define _THREAD_H_ 27 27 28 #include <hal_ types.h>28 #include <hal_kernel_types.h> 29 29 #include <shared_syscalls.h> 30 30 #include <hal_special.h> … … 161 161 void * entry_func; /*! pointer on entry function */ 162 162 void * entry_args; /*! pointer on entry function arguments */ 163 uint32_t main_argc; /*! main thread number of arguments */ 164 char ** main_argv; /*! main thread array of strings arguments */ 163 165 164 166 uint32_t flags; /*! bit vector of flags */ … … 218 220 * The CPU context is initialized from scratch. 219 221 * It is registered in the local process descriptor specified by the <pid> argument. 220 * The THREAD_BLOCKED_GLOBAL bit is set => the thread must be activated to start. 222 * The THREAD_BLOCKED_GLOBAL bit is set => the thread must be activated by the caller 223 * to start at the next scheduling point. 221 224 *************************************************************************************** 222 225 * @ pid : process identifier. … … 258 261 259 262 /*************************************************************************************** 263 * This function is called by the process_make_exec() function to re-initialise the 264 * thread descriptor of the calling thread (that will become the new process main 265 * thread), and immediately jump to user code without returning to kentry!!! 266 * It must be called by the main thread of the calling process. 267 * - A new user stack vseg is created and initialised. 268 * - The kernel stack (currently in use) is not modified. 269 * - The function calls the hal_cpu_context_exec() to re-initialize the CPU context 270 * an jump to user code. 271 *************************************************************************************** 272 * @ entry_func : main thread entry point. 273 * @ argc : number of main thread arguments. 274 * @ argv : array of pointers on stringarguments. 275 * @ returns 0 if success / returns ENOMEM if error. 276 **************************************************************************************/ 277 error_t thread_user_exec( void * entry_func, 278 uint32_t argc, 279 char ** argv); 280 281 /*************************************************************************************** 260 282 * This function allocates memory for a kernel thread descriptor in the local cluster, 261 283 * and initializes it from arguments values. … … 281 303 * descriptor from arguments values. 282 304 * The THREAD_BLOCKED_GLOBAL bit is set, and the thread must be activated to start. 305 * It returns a kernel panic if failure. 283 306 *************************************************************************************** 284 307 * @ thread : pointer on existing thread descriptor. … … 287 310 * @ args : function arguments. 288 311 * @ core_lid : local core index. 289 * @ returns 0 if success / returns EINVAL if error 290 **************************************************************************************/ 291 error_t thread_idle_init( thread_t * thread, 292 thread_type_t type, 293 void * func, 294 void * args, 295 lid_t core_lid ); 312 **************************************************************************************/ 313 void thread_idle_init( thread_t * thread, 314 thread_type_t type, 315 void * func, 316 void * args, 317 lid_t core_lid ); 296 318 297 319 /***************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.