The Pedigree Project
0.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
system
kernel
core
processor
ppc_common
VsidManager.cc
1
/*
2
* Copyright (c) 2008-2014, Pedigree Developers
3
*
4
* Please see the CONTRIB file in the root of the source tree for a full
5
* list of contributors.
6
*
7
* Permission to use, copy, modify, and distribute this software for any
8
* purpose with or without fee is hereby granted, provided that the above
9
* copyright notice and this permission notice appear in all copies.
10
*
11
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
*/
19
20
#include "VsidManager.h"
21
#include "pedigree/kernel/Log.h"
22
23
VsidManager
VsidManager::m_Instance
;
24
25
VsidManager
&
VsidManager::instance
()
26
{
27
return
m_Instance
;
28
}
29
30
VsidManager::VsidManager
() :
m_HighWaterMark
(2),
m_pStack
(0),
m_Mutex
()
31
{
32
}
33
34
VsidManager::~VsidManager
()
35
{
36
}
37
38
VsidManager::Vsid
VsidManager::obtainVsid
()
39
{
41
NOTICE
(
"pStack: "
<< (uintptr_t)
m_pStack
<<
", hwm: "
<<
m_HighWaterMark
);
42
43
// Is the stack NULL?
44
// if (m_pStack == 0)
45
// Return the high water mark and increment.
46
return
m_HighWaterMark
++;
47
48
// Pop the stack.
49
// VsidStack *pPopped = m_pStack;
50
// m_pStack = m_pStack->next;
51
52
// Vsid vsid = pPopped->vsid;
53
// delete pPopped;
54
55
// return vsid;
56
}
57
58
void
VsidManager::returnVsid
(
VsidManager::Vsid
vsid)
59
{
62
63
// VsidStack *pPushed = new VsidStack;
64
// pPushed->vsid = vsid;
65
// pPushed->next = m_pStack;
66
// m_pStack = pPushed;
67
}
VsidManager::returnVsid
void returnVsid(Vsid vsid)
Definition:
VsidManager.cc:58
VsidManager
Definition:
VsidManager.h:41
VsidManager::m_Instance
static VsidManager m_Instance
Definition:
VsidManager.h:81
NOTICE
#define NOTICE(text)
Definition:
Log.h:74
VsidManager::VsidManager
VsidManager()
Definition:
VsidManager.cc:30
VsidManager::m_Mutex
Mutex m_Mutex
Definition:
VsidManager.h:78
VsidManager::instance
static VsidManager & instance()
Definition:
VsidManager.cc:25
VsidManager::m_pStack
VsidStack * m_pStack
Definition:
VsidManager.h:75
VsidManager::Vsid
uint32_t Vsid
Definition:
VsidManager.h:45
VsidManager::obtainVsid
Vsid obtainVsid()
Definition:
VsidManager.cc:38
VsidManager::~VsidManager
~VsidManager()
Definition:
VsidManager.cc:34
VsidManager::m_HighWaterMark
Vsid m_HighWaterMark
Definition:
VsidManager.h:72
Generated on Fri Jan 24 2020 06:49:08 for The Pedigree Project by
1.8.11