Changeset 16 for trunk/kernel/kern/thread.h
- Timestamp:
- May 10, 2017, 5:04:01 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/thread.h
r14 r16 128 128 uint32_t tm_born; /*! date of the thread loading */ 129 129 uint32_t tm_dead; /*! date of the death */ 130 c lock_t tm_sleep; /*! TODO ??? [AG] */131 c lock_t tm_wait; /*! TODO ??? [AG] */132 c lock_t tm_usr; /*! user execution duration */133 c lock_t tm_sys; /*! system execution duration */130 cycle_t tm_sleep; /*! TODO ??? [AG] */ 131 cycle_t tm_wait; /*! TODO ??? [AG] */ 132 cycle_t tm_usr; /*! user execution duration */ 133 cycle_t tm_sys; /*! system execution duration */ 134 134 } 135 135 thread_info_t; … … 151 151 typedef struct thread_s 152 152 { 153 void * cpu_uzone; /*! used for exception/interrupt/syscall */ 154 void * cpu_context; /*! used for context switch */ 155 void * fpu_context; /*! used for dynamic FPU allocation */ 156 153 157 uint32_t trdid; /*! thread index (in THTBL) */ 154 158 thread_type_t type; /*! thread type */ … … 177 181 uint32_t signals; /*! bit vector of signals */ 178 182 179 error_t errno; /*! errno value of last system call*/183 error_t errno; /*! errno value set by last system call */ 180 184 181 185 bool_t fork_user; /*! user defined placement for next fork() */ … … 205 209 xlist_entry_t wait_list; /*! member of threads blocked on same cond */ 206 210 207 void * fpu_context; /*! pointer on FPU context */208 void * cpu_context; /*! pointer on CPU context */209 210 211 thread_info_t info; /*! embedded thread_info_t */ 211 212 … … 219 220 220 221 #define CURRENT_THREAD (hal_get_current_thread()) 222 223 /*************************************************************************************** 224 * This function returns a printable string for a thread type. 225 *************************************************************************************** 226 * @ type : thread type. 227 * returns pointer on string. 228 **************************************************************************************/ 229 char * thread_type_str( uint32_t type ); 221 230 222 231 /*************************************************************************************** … … 438 447 void thread_kill( thread_t * thread ); 439 448 449 /*************************************************************************************** 450 * This function updates the calling thread user_time counter, and reset the thread 451 * cycles counter. 452 * TODO This function is not implemented. 453 *************************************************************************************** 454 * @ thread : local pointer on target thread. 455 **************************************************************************************/ 456 void thread_user_time_update( thread_t * thread ); 457 458 /**************************************************************************************n 459 * This function updates the calling thread kernel_time counter, and reset the thread 460 * cycles counter. 461 * TODO This function is not implemented. 462 *************************************************************************************** 463 * @ thread : local pointer on target thread. 464 **************************************************************************************/ 465 void thread_kernel_time_update( thread_t * thread ); 466 467 /*************************************************************************************** 468 * This function handle all pending signals for the thread identified by the <thread> 469 * argument. It is called each time the core exit the kernel, after handling an 470 * interrupt, exception or syscall. 471 * TODO This function is not implemented. 472 *************************************************************************************** 473 * @ thread : local pointer on target thread. 474 **************************************************************************************/ 475 void thread_signals_handle( thread_t * thread ); 476 477 478 440 479 #endif /* _THREAD_H_ */
Note: See TracChangeset
for help on using the changeset viewer.