~jakub/helenos/ia64-revival

« back to all changes in this revision

Viewing changes to uspace/lib/c/arch/ia32/include/istate.h

  • Committer: Jakub Jermar
  • Date: 2011-04-13 14:45:41 UTC
  • mfrom: (527.1.397 main-clone)
  • Revision ID: jakub@jermar.eu-20110413144541-x0j3r1zxqhsljx1o
MergeĀ mainlineĀ changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
#ifndef LIBC_ia32__ISTATE_H_
36
36
#define LIBC_ia32__ISTATE_H_
37
37
 
38
 
#include <sys/types.h>
39
 
 
40
 
/** Interrupt context.
41
 
 *
42
 
 * This is a copy of the kernel definition with which it must be kept in sync.
43
 
 */
44
 
typedef struct istate {
45
 
        uint32_t eax;
46
 
        uint32_t ecx;
47
 
        uint32_t edx;
48
 
        uint32_t ebp;
49
 
 
50
 
        uint32_t gs;
51
 
        uint32_t fs;
52
 
        uint32_t es;
53
 
        uint32_t ds;
54
 
 
55
 
        uint32_t error_word;
56
 
        uint32_t eip;
57
 
        uint32_t cs;
58
 
        uint32_t eflags;
59
 
        uint32_t stack[];
60
 
} istate_t;
61
 
 
62
 
static inline uintptr_t istate_get_pc(istate_t *istate)
63
 
{
64
 
        return istate->eip;
65
 
}
66
 
 
67
 
static inline uintptr_t istate_get_fp(istate_t *istate)
68
 
{
69
 
        return istate->ebp;
70
 
}
 
38
#include <arch/istate.h>
71
39
 
72
40
#endif
73
41