Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1578 → Rev 1579

/kernel/trunk/generic/include/proc/task.h
40,12 → 40,22
 
/** Task structure. */
struct task {
/** Task lock.
*
* Must be acquired before threads_lock and thread lock of any of its threads.
*/
SPINLOCK_DECLARE(lock);
char *name;
link_t th_head; /**< List of threads contained in this task. */
as_t *as; /**< Address space. */
task_id_t taskid; /**< Unique identity of task */
 
/** If this is true, new threads can become part of the task. */
bool accept_new_threads;
 
count_t refcount; /**< Number of references (i.e. threads). */
 
cap_t capabilities; /**< Task capabilities. */
 
/* IPC stuff */
70,9 → 80,12
 
extern void task_init(void);
extern task_t *task_create(as_t *as, char *name);
extern void task_destroy(task_t *t);
extern task_t *task_run_program(void *program_addr, char *name);
extern task_t *task_find_by_id(task_id_t id);
extern int task_kill(task_id_t id);
 
 
#ifndef task_create_arch
extern void task_create_arch(task_t *t);
#endif
/kernel/trunk/generic/include/proc/thread.h
72,8 → 72,6
/** Lock protecting thread structure.
*
* Protects the whole thread structure except list links above.
* Must be acquired before T.lock for each T of type task_t.
*
*/
SPINLOCK_DECLARE(lock);
 
98,7 → 96,13
bool in_copy_from_uspace;
/** True if this thread is executing copy_to_uspace(). False otherwise. */
bool in_copy_to_uspace;
 
/**
* If true, the thread will not go to sleep at all and will
* call thread_exit() before returning to userspace.
*/
bool interrupted;
bool detached; /**< If true, thread_join_timeout() cannot be used on this thread. */
waitq_t join_wq; /**< Waitq for thread_join_timeout(). */