Loading...
Searching...
No Matches
context_frame.h File Reference

Thread context frame stored on stack. More...

Detailed Description

Thread context frame stored on stack.

Author
JP Bonn

Definition in file context_frame.h.

#include <stdint.h>
+ Include dependency graph for context_frame.h:

Go to the source code of this file.

Data Structures

struct  context_switch_frame
 Stores the registers and PC for a context switch. More...
 

Macros

#define CONTEXT_FRAME_SIZE   (pad_OFFSET + 12)
 Size of context switch frame.
 
#define SP_OFFSET_IN_THREAD   0
 Offset of stack pointer in struct _thread.
 

Register offsets

#define s0_OFFSET   0
 
#define s1_OFFSET   4
 
#define s2_OFFSET   8
 
#define s3_OFFSET   12
 
#define s4_OFFSET   16
 
#define s5_OFFSET   20
 
#define s6_OFFSET   24
 
#define s7_OFFSET   28
 
#define s8_OFFSET   32
 
#define s9_OFFSET   36
 
#define s10_OFFSET   40
 
#define s11_OFFSET   44
 
#define ra_OFFSET   48
 
#define t0_OFFSET   52
 
#define t1_OFFSET   56
 
#define t2_OFFSET   60
 
#define t3_OFFSET   64
 
#define t4_OFFSET   68
 
#define t5_OFFSET   72
 
#define t6_OFFSET   76
 
#define a0_OFFSET   80
 
#define a1_OFFSET   84
 
#define a2_OFFSET   88
 
#define a3_OFFSET   92
 
#define a4_OFFSET   96
 
#define a5_OFFSET   100
 
#define a6_OFFSET   104
 
#define a7_OFFSET   108
 
#define pc_OFFSET   112
 
#define pad_OFFSET   116
 

Macro Definition Documentation

◆ a0_OFFSET

#define a0_OFFSET   80

Definition at line 103 of file context_frame.h.

◆ a1_OFFSET

#define a1_OFFSET   84

Definition at line 104 of file context_frame.h.

◆ a2_OFFSET

#define a2_OFFSET   88

Definition at line 105 of file context_frame.h.

◆ a3_OFFSET

#define a3_OFFSET   92

Definition at line 106 of file context_frame.h.

◆ a4_OFFSET

#define a4_OFFSET   96

Definition at line 107 of file context_frame.h.

◆ a5_OFFSET

#define a5_OFFSET   100

Definition at line 108 of file context_frame.h.

◆ a6_OFFSET

#define a6_OFFSET   104

Definition at line 109 of file context_frame.h.

◆ a7_OFFSET

#define a7_OFFSET   108

Definition at line 110 of file context_frame.h.

◆ CONTEXT_FRAME_SIZE

#define CONTEXT_FRAME_SIZE   (pad_OFFSET + 12)

Size of context switch frame.

Definition at line 118 of file context_frame.h.

◆ pad_OFFSET

#define pad_OFFSET   116

Definition at line 112 of file context_frame.h.

◆ pc_OFFSET

#define pc_OFFSET   112

Definition at line 111 of file context_frame.h.

◆ ra_OFFSET

#define ra_OFFSET   48

Definition at line 95 of file context_frame.h.

◆ s0_OFFSET

#define s0_OFFSET   0

Definition at line 83 of file context_frame.h.

◆ s10_OFFSET

#define s10_OFFSET   40

Definition at line 93 of file context_frame.h.

◆ s11_OFFSET

#define s11_OFFSET   44

Definition at line 94 of file context_frame.h.

◆ s1_OFFSET

#define s1_OFFSET   4

Definition at line 84 of file context_frame.h.

◆ s2_OFFSET

#define s2_OFFSET   8

Definition at line 85 of file context_frame.h.

◆ s3_OFFSET

#define s3_OFFSET   12

Definition at line 86 of file context_frame.h.

◆ s4_OFFSET

#define s4_OFFSET   16

Definition at line 87 of file context_frame.h.

◆ s5_OFFSET

#define s5_OFFSET   20

Definition at line 88 of file context_frame.h.

◆ s6_OFFSET

#define s6_OFFSET   24

Definition at line 89 of file context_frame.h.

◆ s7_OFFSET

#define s7_OFFSET   28

Definition at line 90 of file context_frame.h.

◆ s8_OFFSET

#define s8_OFFSET   32

Definition at line 91 of file context_frame.h.

◆ s9_OFFSET

#define s9_OFFSET   36

Definition at line 92 of file context_frame.h.

◆ SP_OFFSET_IN_THREAD

#define SP_OFFSET_IN_THREAD   0

Offset of stack pointer in struct _thread.

Definition at line 123 of file context_frame.h.

◆ t0_OFFSET

#define t0_OFFSET   52

Definition at line 96 of file context_frame.h.

◆ t1_OFFSET

#define t1_OFFSET   56

Definition at line 97 of file context_frame.h.

◆ t2_OFFSET

#define t2_OFFSET   60

Definition at line 98 of file context_frame.h.

◆ t3_OFFSET

#define t3_OFFSET   64

Definition at line 99 of file context_frame.h.

◆ t4_OFFSET

#define t4_OFFSET   68

Definition at line 100 of file context_frame.h.

◆ t5_OFFSET

#define t5_OFFSET   72

Definition at line 101 of file context_frame.h.

◆ t6_OFFSET

#define t6_OFFSET   76

Definition at line 102 of file context_frame.h.