Subversion Repositories HelenOS-historic

Rev

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

Rev 1427 Rev 1610
Line 38... Line 38...
38
    (c)->pc = (sysarg_t) (_pc);             \
38
    (c)->pc = (sysarg_t) (_pc);             \
39
    (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA;     \
39
    (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA;     \
40
        (c)->tls = (sysarg_t) (ptls);
40
        (c)->tls = (sysarg_t) (ptls);
41
#endif /* context_set */
41
#endif /* context_set */
42
 
42
 
-
 
43
#define PSTHREAD_SERIALIZED   1
-
 
44
 
43
typedef enum {
45
typedef enum {
44
    PS_TO_MANAGER,
46
    PS_TO_MANAGER,
45
    PS_FROM_MANAGER,
47
    PS_FROM_MANAGER,
46
    PS_PREEMPT
48
    PS_PREEMPT,
-
 
49
    PS_FROM_DEAD
47
} pschange_type;
50
} pschange_type;
48
 
51
 
49
typedef sysarg_t pstid_t;
52
typedef sysarg_t pstid_t;
50
 
53
 
51
struct psthread_data {
54
struct psthread_data {
Line 73... Line 76...
73
int psthread_schedule_next_adv(pschange_type ctype);
76
int psthread_schedule_next_adv(pschange_type ctype);
74
void psthread_add_ready(pstid_t ptid);
77
void psthread_add_ready(pstid_t ptid);
75
void psthread_add_manager(pstid_t psthrid);
78
void psthread_add_manager(pstid_t psthrid);
76
void psthread_remove_manager(void);
79
void psthread_remove_manager(void);
77
pstid_t psthread_get_id(void);
80
pstid_t psthread_get_id(void);
-
 
81
void psthread_inc_sercount(void);
-
 
82
void psthread_dec_sercount(void);
78
 
83
 
79
static inline int psthread_schedule_next() {
84
static inline int psthread_schedule_next() {
80
    return psthread_schedule_next_adv(PS_PREEMPT);
85
    return psthread_schedule_next_adv(PS_PREEMPT);
81
}
86
}
82
 
87