Subversion Repositories HelenOS

Rev

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

Rev 2479 Rev 2481
Line 47... Line 47...
47
#endif /* context_set */
47
#endif /* context_set */
48
 
48
 
49
#define PSTHREAD_SERIALIZED   1
49
#define PSTHREAD_SERIALIZED   1
50
 
50
 
51
typedef enum {
51
typedef enum {
-
 
52
    PS_SLEEP,
-
 
53
    PS_PREEMPT,
52
    PS_TO_MANAGER,
54
    PS_TO_MANAGER,
53
    PS_FROM_MANAGER,
55
    PS_FROM_MANAGER,
54
    PS_PREEMPT,
-
 
55
    PS_FROM_DEAD
56
    PS_FROM_DEAD
56
} pschange_type;
57
} pschange_type;
57
 
58
 
58
typedef sysarg_t pstid_t;
59
typedef sysarg_t pstid_t;
59
 
60
 
Line 63... Line 64...
63
    void *stack;
64
    void *stack;
64
    void *arg;
65
    void *arg;
65
    int (*func)(void *);
66
    int (*func)(void *);
66
    tcb_t *tcb;
67
    tcb_t *tcb;
67
 
68
 
-
 
69
    struct psthread_data *clean_after_me;
68
    struct psthread_data *waiter;
70
    struct psthread_data *joiner;
69
    int finished;
71
    int joinee_retval;
70
    int retval;
72
    int retval;
71
    int flags;
73
    int flags;
72
};
74
};
73
typedef struct psthread_data psthread_data_t;
75
typedef struct psthread_data psthread_data_t;
74
 
76
 
Line 85... Line 87...
85
void psthread_remove_manager(void);
87
void psthread_remove_manager(void);
86
pstid_t psthread_get_id(void);
88
pstid_t psthread_get_id(void);
87
void psthread_inc_sercount(void);
89
void psthread_inc_sercount(void);
88
void psthread_dec_sercount(void);
90
void psthread_dec_sercount(void);
89
 
91
 
90
static inline int psthread_schedule_next() {
92
static inline int psthread_schedule_next(void) {
91
    return psthread_schedule_next_adv(PS_PREEMPT);
93
    return psthread_schedule_next_adv(PS_PREEMPT);
92
}
94
}
93
 
95
 
94
 
-
 
95
#endif
96
#endif
96
 
97
 
97
/** @}
98
/** @}
98
 */
99
 */