Changes in kernel/generic/include/proc/thread.h [e1b6742:d9ece1cb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/proc/thread.h
re1b6742 rd9ece1cb 48 48 #include <proc/uarg.h> 49 49 #include <udebug/udebug.h> 50 #include <sysinfo/abi.h>51 50 52 51 #define THREAD_STACK_SIZE STACK_SIZE 53 52 #define THREAD_NAME_BUFLEN 20 54 53 55 extern c onst char *thread_states[];54 extern char *thread_states[]; 56 55 57 56 /* Thread flags */ … … 70 69 #define THREAD_FLAG_NOATTACH (1 << 3) 71 70 71 /** Thread states. */ 72 typedef enum { 73 /** It is an error, if thread is found in this state. */ 74 Invalid, 75 /** State of a thread that is currently executing on some CPU. */ 76 Running, 77 /** Thread in this state is waiting for an event. */ 78 Sleeping, 79 /** State of threads in a run queue. */ 80 Ready, 81 /** Threads are in this state before they are first readied. */ 82 Entering, 83 /** After a thread calls thread_exit(), it is put into Exiting state. */ 84 Exiting, 85 /** Threads that were not detached but exited are Lingering. */ 86 Lingering 87 } state_t; 88 72 89 /** Thread structure. There is one per thread. */ 73 90 typedef struct thread { … … 172 189 173 190 /** Thread accounting. */ 174 uint64_t ucycles; 175 uint64_t kcycles; 191 uint64_t cycles; 176 192 /** Last sampled cycle. */ 177 193 uint64_t last_cycle; … … 209 225 210 226 extern void thread_init(void); 211 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, 212 const char *,bool);227 extern thread_t *thread_create(void (*)(void *), void *, task_t *, int, char *, 228 bool); 213 229 extern void thread_attach(thread_t *, task_t *); 214 230 extern void thread_ready(thread_t *); … … 236 252 extern void thread_print_list(void); 237 253 extern void thread_destroy(thread_t *); 238 extern thread_t *thread_find_by_id(thread_id_t); 239 extern void thread_update_accounting(bool); 254 extern void thread_update_accounting(void); 240 255 extern bool thread_exists(thread_t *); 241 256
Note:
See TracChangeset
for help on using the changeset viewer.