-
Notifications
You must be signed in to change notification settings - Fork 0
/
tss.h
70 lines (59 loc) · 1.81 KB
/
tss.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* ** por compatibilidad se omiten tildes **
================================================================================
TRABAJO PRACTICO 3 - System Programming - ORGANIZACION DE COMPUTADOR II - FCEN
================================================================================
definicion de estructuras para administrar tareas
*/
#ifndef __TSS_H__
#define __TSS_H__
#include "defines.h"
typedef struct str_tss {
unsigned short ptl;
unsigned short unused0;
unsigned int esp0;
unsigned short ss0;
unsigned short unused1;
unsigned int esp1;
unsigned short ss1;
unsigned short unused2;
unsigned int esp2;
unsigned short ss2;
unsigned short unused3;
unsigned int cr3;
unsigned int eip;
unsigned int eflags;
unsigned int eax;
unsigned int ecx;
unsigned int edx;
unsigned int ebx;
unsigned int esp;
unsigned int ebp;
unsigned int esi;
unsigned int edi;
unsigned short es;
unsigned short unused4;
unsigned short cs;
unsigned short unused5;
unsigned short ss;
unsigned short unused6;
unsigned short ds;
unsigned short unused7;
unsigned short fs;
unsigned short unused8;
unsigned short gs;
unsigned short unused9;
unsigned short ldt;
unsigned short unused10;
unsigned short dtrap;
unsigned short iomap;
} __attribute__((__packed__, aligned (8))) tss;
extern tss tarea_inicial;
extern tss tarea_idle;
extern tss tarea_dibujar;
extern tss tss_navios[CANT_TAREAS];
extern tss tss_banderas[CANT_TAREAS];
extern unsigned int offsets_funciones_bandera[CANT_TAREAS];
void tss_inicializar_tarea_idle();
void tss_inicializar(tss* tarea, unsigned short gdt_idx, unsigned int id_tarea);
void renovar_banderas();
#endif /* !__TSS_H__ */