Subversion Repositories HelenOS-historic

Rev

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

Rev 1066 Rev 1078
Line 38... Line 38...
38
#include <time/timeout.h>
38
#include <time/timeout.h>
39
#include <synch/rwlock.h>
39
#include <synch/rwlock.h>
40
#include <config.h>
40
#include <config.h>
41
#include <adt/list.h>
41
#include <adt/list.h>
42
#include <mm/slab.h>
42
#include <mm/slab.h>
-
 
43
#include <proc/uarg.h>
43
 
44
 
44
#define THREAD_STACK_SIZE   STACK_SIZE
45
#define THREAD_STACK_SIZE   STACK_SIZE
45
 
46
 
46
enum state {
47
enum state {
47
    Invalid,    /**< It is an error, if thread is found in this state. */
48
    Invalid,    /**< It is an error, if thread is found in this state. */
Line 115... Line 116...
115
    ARCH_THREAD_DATA;           /**< Architecture-specific data. */
116
    ARCH_THREAD_DATA;           /**< Architecture-specific data. */
116
 
117
 
117
    __u8 *kstack;               /**< Thread's kernel stack. */
118
    __u8 *kstack;               /**< Thread's kernel stack. */
118
};
119
};
119
 
120
 
120
/** Structure passed to uinit kernel thread as argument. */
-
 
121
typedef struct uspace_arg {
-
 
122
    __address uspace_entry;
-
 
123
    __address uspace_stack;
-
 
124
} uspace_arg_t;
-
 
125
 
-
 
126
/** Thread list lock.
121
/** Thread list lock.
127
 *
122
 *
128
 * This lock protects all link_t structures chained in threads_head.
123
 * This lock protects all link_t structures chained in threads_head.
129
 * Must be acquired before T.lock for each T of type thread_t.
124
 * Must be acquired before T.lock for each T of type thread_t.
130
 *
125
 *
Line 147... Line 142...
147
 
142
 
148
/* Fpu context slab cache */
143
/* Fpu context slab cache */
149
extern slab_cache_t *fpu_context_slab;
144
extern slab_cache_t *fpu_context_slab;
150
 
145
 
151
/** Thread syscall prototypes. */
146
/** Thread syscall prototypes. */
152
__native sys_thread_create(__address function, void *arg, void *stack, char *name);
147
__native sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name);
153
__native sys_thread_exit(int status);
148
__native sys_thread_exit(int uspace_status);
154
 
149
 
155
#endif
150
#endif