Subversion Repositories HelenOS

Rev

Rev 3386 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 50... Line 50...
50
#include <arch/context.h>
50
#include <arch/context.h>
51
#include <arch/fpu_context.h>
51
#include <arch/fpu_context.h>
52
#include <arch/cpu.h>
52
#include <arch/cpu.h>
53
#include <mm/tlb.h>
53
#include <mm/tlb.h>
54
#include <proc/scheduler.h>
54
#include <proc/scheduler.h>
-
 
55
#include <udebug/udebug.h>
-
 
56
#include <ipc/kbox.h>
-
 
57
 
-
 
58
#define TASK_NAME_BUFLEN    20
55
 
59
 
56
struct thread;
60
struct thread;
57
 
61
 
58
/** Task structure. */
62
/** Task structure. */
59
typedef struct task {
63
typedef struct task {
Line 64... Line 68...
64
     *
68
     *
65
     * Must be acquired before threads_lock and thread lock of any of its
69
     * Must be acquired before threads_lock and thread lock of any of its
66
     * threads.
70
     * threads.
67
     */
71
     */
68
    SPINLOCK_DECLARE(lock);
72
    SPINLOCK_DECLARE(lock);
69
   
73
 
70
    char *name;
74
    char name[TASK_NAME_BUFLEN];
71
    /** List of threads contained in this task. */
75
    /** List of threads contained in this task. */
72
    link_t th_head;
76
    link_t th_head;
73
    /** Address space. */
77
    /** Address space. */
74
    as_t *as;
78
    as_t *as;
75
    /** Unique identity of task. */
79
    /** Unique identity of task. */
Line 91... Line 95...
91
    /**
95
    /**
92
     * Active asynchronous messages. It is used for limiting uspace to
96
     * Active asynchronous messages. It is used for limiting uspace to
93
     * certain extent.
97
     * certain extent.
94
     */
98
     */
95
    atomic_t active_calls;
99
    atomic_t active_calls;
-
 
100
 
-
 
101
#ifdef CONFIG_UDEBUG
-
 
102
    /** Debugging stuff. */
-
 
103
    udebug_task_t udebug;
96
   
104
 
-
 
105
    /** Kernel answerbox. */
-
 
106
    kbox_t kb;
-
 
107
#endif
-
 
108
 
97
    /** Architecture specific task data. */
109
    /** Architecture specific task data. */
98
    task_arch_t arch;
110
    task_arch_t arch;
99
   
111
   
100
    /**
112
    /**
101
     * Serializes access to the B+tree of task's futexes. This mutex is
113
     * Serializes access to the B+tree of task's futexes. This mutex is
Line 130... Line 142...
130
#ifndef task_destroy_arch
142
#ifndef task_destroy_arch
131
extern void task_destroy_arch(task_t *t);
143
extern void task_destroy_arch(task_t *t);
132
#endif
144
#endif
133
 
145
 
134
extern unative_t sys_task_get_id(task_id_t *uspace_task_id);
146
extern unative_t sys_task_get_id(task_id_t *uspace_task_id);
-
 
147
extern unative_t sys_task_set_name(const char *uspace_name, size_t name_len);
135
 
148
 
136
#endif
149
#endif
137
 
150
 
138
/** @}
151
/** @}
139
 */
152
 */