Changes in kernel/generic/include/proc/task.h [ee42e43:41df2827] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/proc/task.h
ree42e43 r41df2827 1 1 /* 2 * Copyright (c) 20 10Jakub Jermar2 * Copyright (c) 2001-2004 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 40 40 #include <synch/spinlock.h> 41 41 #include <synch/mutex.h> 42 #include <synch/rwlock.h> 42 43 #include <synch/futex.h> 43 44 #include <adt/avl.h> … … 55 56 #include <ipc/kbox.h> 56 57 #include <mm/as.h> 57 #include <sysinfo/abi.h> 58 59 #define TASK_NAME_BUFLEN 20 58 60 59 61 struct thread; … … 69 71 * threads. 70 72 */ 71 IRQ_SPINLOCK_DECLARE(lock);72 73 SPINLOCK_DECLARE(lock); 74 73 75 char name[TASK_NAME_BUFLEN]; 74 76 /** List of threads contained in this task. */ … … 79 81 task_id_t taskid; 80 82 /** Task security context. */ 81 context_id_t context; 82 83 context_id_t context; 84 83 85 /** Number of references (i.e. threads). */ 84 86 atomic_t refcount; 85 87 /** Number of threads that haven't exited yet. */ 86 88 atomic_t lifecount; 87 89 88 90 /** Task capabilities. */ 89 cap_t capabilities; 90 91 cap_t capabilities; 92 91 93 /* IPC stuff */ 92 94 answerbox_t answerbox; /**< Communication endpoint */ 93 95 phone_t phones[IPC_MAX_PHONES]; 94 stats_ipc_t ipc_info; /**< IPC statistics */95 96 /** 96 97 * Active asynchronous messages. It is used for limiting uspace to … … 100 101 /** List of synchronous answerboxes. */ 101 102 link_t sync_box_head; 102 103 103 104 #ifdef CONFIG_UDEBUG 104 105 /** Debugging stuff. */ 105 106 udebug_task_t udebug; 106 107 107 108 /** Kernel answerbox. */ 108 109 kbox_t kb; 109 #endif /* CONFIG_UDEBUG */110 110 #endif 111 111 112 /** Architecture specific task data. */ 112 113 task_arch_t arch; … … 118 119 mutex_t futexes_lock; 119 120 /** B+tree of futexes referenced by this task. */ 120 btree_t futexes; 121 btree_t futexes; 121 122 122 123 /** Accumulated accounting. */ 123 uint64_t ucycles; 124 uint64_t kcycles; 124 uint64_t cycles; 125 125 } task_t; 126 126 127 IRQ_SPINLOCK_EXTERN(tasks_lock);127 SPINLOCK_EXTERN(tasks_lock); 128 128 extern avltree_t tasks_tree; 129 129 130 130 extern void task_init(void); 131 131 extern void task_done(void); 132 extern task_t *task_create(as_t *, const char *); 133 extern void task_destroy(task_t *); 134 extern void task_hold(task_t *); 135 extern void task_release(task_t *); 136 extern task_t *task_find_by_id(task_id_t); 137 extern int task_kill(task_id_t); 138 extern void task_get_accounting(task_t *, uint64_t *, uint64_t *); 139 extern void task_print_list(bool); 132 extern task_t *task_create(as_t *as, char *name); 133 extern void task_destroy(task_t *t); 134 extern task_t *task_find_by_id(task_id_t id); 135 extern int task_kill(task_id_t id); 136 extern uint64_t task_get_accounting(task_t *t); 137 extern void task_print_list(void); 140 138 141 extern void cap_set(task_t * , cap_t);142 extern cap_t cap_get(task_t * );139 extern void cap_set(task_t *t, cap_t caps); 140 extern cap_t cap_get(task_t *t); 143 141 144 142 #ifndef task_create_arch 145 extern void task_create_arch(task_t * );143 extern void task_create_arch(task_t *t); 146 144 #endif 147 145 148 146 #ifndef task_destroy_arch 149 extern void task_destroy_arch(task_t * );147 extern void task_destroy_arch(task_t *t); 150 148 #endif 151 149 152 extern unative_t sys_task_get_id(task_id_t * );153 extern unative_t sys_task_set_name(const char * , size_t);150 extern unative_t sys_task_get_id(task_id_t *uspace_task_id); 151 extern unative_t sys_task_set_name(const char *uspace_name, size_t name_len); 154 152 155 153 #endif
Note:
See TracChangeset
for help on using the changeset viewer.