-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpcb.cpp
52 lines (38 loc) · 866 Bytes
/
pcb.cpp
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
#include "rtx.h"
#include "pcb.h"
#include "process.h"
using namespace rtx_stl;
////////////////
// PCB FUNCTIONS
////////////////
PCB::PCB( Process * pProcess ) : m_id( pProcess->process().id ),
m_model( pProcess )//,
//m_envelope_inbox( new queue <MsgEnv> )
{
}
PCB::~PCB()
{
}
/////////////////
// UPCB FUNCTIONS
/////////////////
UPCB::UPCB( Process * pProcess ) : PCB( pProcess ),
m_priority( pProcess->process().priority ),
m_status( READY )
{
m_stack = ( byte * ) malloc( PROCESS_STACK_SIZE ) + PROCESS_STACK_SIZE - 4;
}
UPCB::~UPCB()
{
delete m_stack;
}
/////////////////
// IPCB FUNCTIONS
/////////////////
IPCB::IPCB( Process * pProcess ) : PCB( pProcess ),
m_signals_handled( pProcess->process().signals_handled )
{
}
IPCB::~IPCB()
{
}