-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscheduler.h
More file actions
76 lines (56 loc) · 962 Bytes
/
scheduler.h
File metadata and controls
76 lines (56 loc) · 962 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
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
71
72
73
74
75
76
/*
** SCCS ID: @(#)scheduler.h 1.1 4/17/15
**
** File: scheduler.h
**
** Author: CSCI-452 class of 20145
**
** Contributor:
**
** Description: Scheduler/dispatcher module declarations
*/
#ifndef _SCHEDULER_H_
#define _SCHEDULER_H_
#include "types.h"
/*
** General (C and/or assembly) definitions
*/
#ifndef __SP_ASM__
/*
** Start of C-only definitions
*/
#include "process.h"
#include "queue.h"
// number of ready queues - one per priority level
#define N_READY N_PRIOS
/*
** Types
*/
/*
** Globals
*/
extern pcb_t *_current; // the currently-running process
extern queue_t _ready[]; // the MLQ ready queue structure
/*
** Prototypes
*/
/*
** _sched_modinit()
**
** initialize the scheduler module
*/
void _sched_modinit( void );
/*
** _schedule(pcb)
**
** schedule a process for execution according to its priority
*/
void _schedule( pcb_t *pcb );
/*
** _dispatch()
**
** give the CPU to a process
*/
void _dispatch( void );
#endif
#endif