summaryrefslogtreecommitdiff
path: root/include/PR/sched.h
blob: 778bd7d1c0a5b6ee5c6fe7a47ef1e9795b906191 (plain)
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
#ifndef PR_SCHED_H
#define PR_SCHED_H

#include "PR/ultratypes.h"
#include "PR/os_vi.h"
#include "PR/sptask.h"

#define OS_SC_STACKSIZE      0x2000

#define OS_SC_RETRACE_MSG       1
#define OS_SC_DONE_MSG          2
#define OS_SC_RDP_DONE_MSG      3
#define OS_SC_PRE_NMI_MSG       4
#define OS_SC_LAST_MSG          4	/* this should have highest number */
#define OS_SC_MAX_MESGS         8

#define OS_SC_NEEDS_RDP         0x0001
#define OS_SC_NEEDS_RSP         0x0002
#define OS_SC_DRAM_DLIST        0x0004
#define OS_SC_PARALLEL_TASK     0x0010
#define OS_SC_LAST_TASK         0x0020
#define OS_SC_SWAPBUFFER        0x0040

#define OS_SC_RCP_MASK          0x0003
#define OS_SC_TYPE_MASK         0x0007

typedef struct OSScTask {
    /* 0x00 */ struct OSScTask* next;
    /* 0x04 */ u32              state;
    /* 0x08 */ u32              flags;
    /* 0x0C */ void*            framebuffer;
    /* 0x10 */ OSTask           list;
    /* 0x50 */ OSMesgQueue*     msgQ;
    /* 0x54 */ OSMesg           msg;
} OSScTask; // size = 0x58

typedef struct {
    /* 0x0 */ s16 type;
    /* 0x2 */ u8 misc[30];
} OSScMsg;

#endif