Changeset 7509ddc in mainline for generic/include/proc/task.h


Ignore:
Timestamp:
2006-06-04T21:54:49Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
34dcd3f
Parents:
2cb5e64
Message:

Framework for task_kill().
Some pieces (e.g. implementation of ktask_cleanup() kernel thread and
task_destroy() function) are missing.
Changed locking order for task lock, threads_lock and thread lock from
threads_lock, thread lock, task lock to task lock, threads_lock, thread lock.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/include/proc/task.h

    r2cb5e64 r7509ddc  
    4141/** Task structure. */
    4242struct task {
     43        /** Task lock.
     44         *
     45         * Must be acquired before threads_lock and thread lock of any of its threads.
     46         */
    4347        SPINLOCK_DECLARE(lock);
     48       
    4449        char *name;
    4550        link_t th_head;         /**< List of threads contained in this task. */
    4651        as_t *as;               /**< Address space. */
    4752        task_id_t taskid;       /**< Unique identity of task */
     53
     54        /** If this is true, new threads can become part of the task. */
     55        bool accept_new_threads;
     56
     57        count_t refcount;       /**< Number of references (i.e. threads). */
    4858
    4959        cap_t capabilities;     /**< Task capabilities. */
     
    7181extern void task_init(void);
    7282extern task_t *task_create(as_t *as, char *name);
     83extern void task_destroy(task_t *t);
    7384extern task_t *task_run_program(void *program_addr, char *name);
    7485extern task_t *task_find_by_id(task_id_t id);
     86extern int task_kill(task_id_t id);
     87
    7588
    7689#ifndef task_create_arch
Note: See TracChangeset for help on using the changeset viewer.