Subversion Repositories HelenOS-historic

Rev

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

Rev 1113 Rev 1125
Line 31... Line 31...
31
 
31
 
32
#include <libarch/psthread.h>
32
#include <libarch/psthread.h>
33
#include <libadt/list.h>
33
#include <libadt/list.h>
34
 
34
 
35
#ifndef context_set
35
#ifndef context_set
36
#define context_set(c, _pc, stack, size, ptls)  \
36
#define context_set(c, _pc, stack, size, ptls)          \
37
    (c)->pc = (sysarg_t) (_pc);     \
37
    (c)->pc = (sysarg_t) (_pc);             \
38
    (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA; \
38
    (c)->sp = ((sysarg_t) (stack)) + (size) - SP_DELTA;     \
39
        (c)->tls = (sysarg_t) (ptls);
39
        (c)->tls = (sysarg_t) (ptls);
40
#endif /* context_set */
40
#endif /* context_set */
41
 
41
 
42
typedef sysarg_t pstid_t;
42
typedef sysarg_t pstid_t;
43
 
43
 
44
struct psthread_data {
44
struct psthread_data {
45
    struct psthread_data *self; /* IA32,AMD64 needs to get self address */
45
    struct psthread_data *self; /* ia32, amd64 needs to get self address */
46
 
46
 
47
    link_t list;
47
    link_t list;
48
    context_t ctx;
48
    context_t ctx;
49
    void *stack;
49
    void *stack;
50
    void *arg;
50
    void *arg;