forked from UA-CSC452/phase1-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphase1Int.h
More file actions
34 lines (24 loc) · 859 Bytes
/
Copy pathphase1Int.h
File metadata and controls
34 lines (24 loc) · 859 Bytes
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
/*
* Internal Phase 1 definitions. These may be used by other functions in Phase 1.
* Version 1.0
* DO NOT MODIFY THIS FILE.
*/
#ifndef _PHASE1_INT_H
#define _PHASE1_INT_H
#include "phase1.h"
// Phase 1a
void P1ContextInit(void);
int P1ContextCreate(void (*func)(void *), void *arg, int stacksize, int *cid) CHECKRETURN;
int P1ContextCreate(void (*func)(void *), void *arg, int stacksize, int *cid) CHECKRETURN;
int P1ContextSwitch(int cid) CHECKRETURN;
int P1ContextFree(int cid) CHECKRETURN;
int P1DisableInterrupts(void) CHECKRETURN;
void P1EnableInterrupts(void);
// Phase 1b
void P1ProcInit(void);
int P1GetChildStatus(int tag, int *pid, int *status) CHECKRETURN;
int P1SetState(int pid, P1_State state, int sid) CHECKRETURN;
void P1Dispatch(int rotate);
// Phase 1c
void P1SemInit(void);
#endif