Changeset a35b458 in mainline for kernel/generic/include/proc
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- Location:
- kernel/generic/include/proc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/proc/task.h
r3061bc1 ra35b458 73 73 /** Task's linkage for the tasks_tree AVL tree. */ 74 74 avltree_node_t tasks_tree_node; 75 75 76 76 /** Task lock. 77 77 * … … 80 80 */ 81 81 IRQ_SPINLOCK_DECLARE(lock); 82 82 83 83 char name[TASK_NAME_BUFLEN]; 84 84 /** List of threads contained in this task. */ … … 90 90 /** Task security container. */ 91 91 container_id_t container; 92 92 93 93 /** Number of references (i.e. threads). */ 94 94 atomic_t refcount; 95 95 /** Number of threads that haven't exited yet. */ 96 96 atomic_t lifecount; 97 97 98 98 /** Task permissions. */ 99 99 perm_t perms; … … 101 101 /** Capabilities */ 102 102 cap_info_t *cap_info; 103 103 104 104 /* IPC stuff */ 105 105 … … 120 120 /** IPC statistics */ 121 121 stats_ipc_t ipc_info; 122 122 123 123 #ifdef CONFIG_UDEBUG 124 124 /** Debugging stuff. */ 125 125 udebug_task_t udebug; 126 126 127 127 /** Kernel answerbox. */ 128 128 kbox_t kb; 129 129 #endif /* CONFIG_UDEBUG */ 130 130 131 131 /** Architecture specific task data. */ 132 132 task_arch_t arch; 133 133 134 134 struct futex_cache { 135 135 /** CHT mapping virtual addresses of futex variables to futex objects.*/ … … 141 141 work_t destroy_work; 142 142 } *futexes; 143 143 144 144 /** Accumulated accounting. */ 145 145 uint64_t ucycles; -
kernel/generic/include/proc/thread.h
r3061bc1 ra35b458 75 75 link_t wq_link; /**< Wait queue link. */ 76 76 link_t th_link; /**< Links to threads within containing task. */ 77 77 78 78 /** Threads linkage to the threads_tree. */ 79 79 avltree_node_t threads_tree_node; 80 80 81 81 /** Lock protecting thread structure. 82 82 * … … 84 84 */ 85 85 IRQ_SPINLOCK_DECLARE(lock); 86 86 87 87 char name[THREAD_NAME_BUFLEN]; 88 88 89 89 /** Function implementing the thread. */ 90 90 void (*thread_code)(void *); 91 91 /** Argument passed to thread_code() function. */ 92 92 void *thread_arg; 93 93 94 94 /** 95 95 * From here, the stored context is restored … … 97 97 */ 98 98 context_t saved_context; 99 99 100 100 /** 101 101 * From here, the stored timeout context … … 103 103 */ 104 104 context_t sleep_timeout_context; 105 105 106 106 /** 107 107 * From here, the stored interruption context … … 109 109 */ 110 110 context_t sleep_interruption_context; 111 111 112 112 /** If true, the thread can be interrupted from sleep. */ 113 113 bool sleep_interruptible; … … 118 118 /** Flag signalling sleep timeout in progress. */ 119 119 volatile bool timeout_pending; 120 120 121 121 /** 122 122 * True if this thread is executing copy_from_uspace(). … … 124 124 */ 125 125 bool in_copy_from_uspace; 126 126 127 127 /** 128 128 * True if this thread is executing copy_to_uspace(). … … 130 130 */ 131 131 bool in_copy_to_uspace; 132 132 133 133 /** 134 134 * If true, the thread will not go to sleep at all and will call … … 136 136 */ 137 137 bool interrupted; 138 138 139 139 /** If true, thread_join_timeout() cannot be used on this thread. */ 140 140 bool detached; … … 143 143 /** Link used in the joiner_head list. */ 144 144 link_t joiner_link; 145 145 146 146 fpu_context_t *saved_fpu_context; 147 147 bool fpu_context_exists; 148 148 149 149 /* 150 150 * Defined only if thread doesn't run. … … 153 153 */ 154 154 bool fpu_context_engaged; 155 155 156 156 /* The thread will not be migrated if nomigrate is non-zero. */ 157 157 unsigned int nomigrate; 158 158 159 159 /** Thread state. */ 160 160 state_t state; 161 161 162 162 /** Thread CPU. */ 163 163 cpu_t *cpu; … … 170 170 /** Thread is executed in user space. */ 171 171 bool uspace; 172 172 173 173 /** Ticks before preemption. */ 174 174 uint64_t ticks; 175 175 176 176 /** Thread accounting. */ 177 177 uint64_t ucycles; … … 181 181 /** Thread doesn't affect accumulated accounting. */ 182 182 bool uncounted; 183 183 184 184 /** Thread's priority. Implemented as index to CPU->rq */ 185 185 int priority; … … 195 195 /** True if the worker will block in order to become idle. Use workq->lock. */ 196 196 bool workq_idling; 197 197 198 198 /** RCU thread related data. Protected by its own locks. */ 199 199 rcu_thread_data_t rcu; 200 200 201 201 /** Architecture-specific data. */ 202 202 thread_arch_t arch; 203 203 204 204 /** Thread's kernel stack. */ 205 205 uint8_t *kstack; 206 206 207 207 #ifdef CONFIG_UDEBUG 208 208 /** … … 211 211 */ 212 212 bool btrace; 213 213 214 214 /** Debugging stuff */ 215 215 udebug_thread_t udebug;
Note:
See TracChangeset
for help on using the changeset viewer.