Subversion Repositories HelenOS-historic

Rev

Rev 1502 | Rev 1576 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1502 Rev 1571
Line 49... Line 49...
49
    Invalid,    /**< It is an error, if thread is found in this state. */
49
    Invalid,    /**< It is an error, if thread is found in this state. */
50
    Running,    /**< State of a thread that is currently executing on some CPU. */
50
    Running,    /**< State of a thread that is currently executing on some CPU. */
51
    Sleeping,   /**< Thread in this state is waiting for an event. */
51
    Sleeping,   /**< Thread in this state is waiting for an event. */
52
    Ready,      /**< State of threads in a run queue. */
52
    Ready,      /**< State of threads in a run queue. */
53
    Entering,   /**< Threads are in this state before they are first readied. */
53
    Entering,   /**< Threads are in this state before they are first readied. */
54
    Exiting     /**< After a thread calls thread_exit(), it is put into Exiting state. */
54
    Exiting,    /**< After a thread calls thread_exit(), it is put into Exiting state. */
-
 
55
    Undead      /**< Threads that were not detached but exited are in the Undead state. */
55
};
56
};
56
 
57
 
57
extern char *thread_states[];
58
extern char *thread_states[];
58
 
59
 
59
#define X_WIRED     (1<<0)
60
#define X_WIRED     (1<<0)
Line 95... Line 96...
95
    /** True if this thread is executing copy_from_uspace(). False otherwise. */
96
    /** True if this thread is executing copy_from_uspace(). False otherwise. */
96
    bool in_copy_from_uspace;
97
    bool in_copy_from_uspace;
97
    /** True if this thread is executing copy_to_uspace(). False otherwise. */
98
    /** True if this thread is executing copy_to_uspace(). False otherwise. */
98
    bool in_copy_to_uspace;
99
    bool in_copy_to_uspace;
99
 
100
 
-
 
101
    bool detached;              /**< If true, thread_join_timeout() cannot be used on this thread. */
-
 
102
    waitq_t join_wq;            /**< Waitq for thread_join_timeout(). */
100
 
103
 
101
    fpu_context_t *saved_fpu_context;
104
    fpu_context_t *saved_fpu_context;
102
    int fpu_context_exists;
105
    int fpu_context_exists;
103
 
106
 
104
    /*
107
    /*
Line 149... Line 152...
149
#endif
152
#endif
150
 
153
 
151
extern void thread_sleep(__u32 sec);
154
extern void thread_sleep(__u32 sec);
152
extern void thread_usleep(__u32 usec);
155
extern void thread_usleep(__u32 usec);
153
 
156
 
-
 
157
extern int thread_join_timeout(thread_t *t, __u32 usec, int flags);
-
 
158
extern void thread_detach(thread_t *t);
-
 
159
 
154
extern void thread_register_call_me(void (* call_me)(void *), void *call_me_with);
160
extern void thread_register_call_me(void (* call_me)(void *), void *call_me_with);
155
extern void thread_print_list(void);
161
extern void thread_print_list(void);
156
extern void thread_destroy(thread_t *t);
162
extern void thread_destroy(thread_t *t);
157
extern bool thread_exists(thread_t *t);
163
extern bool thread_exists(thread_t *t);
158
 
164