+ getRegisteredProcesses()
This commit is contained in:
parent
9ced919be4
commit
71bd846c6b
@ -85,4 +85,16 @@ namespace vkvm {
|
|||||||
unlockSharedMemory();
|
unlockSharedMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto getRegisteredProcesses(EventType eventType) -> std::vector<int> {
|
||||||
|
std::vector<int> result;
|
||||||
|
auto ivt = getInterruptTable();
|
||||||
|
for(int i = 0; i < impl.interruptEntrysPerEventType;i++){
|
||||||
|
auto &entry= ivt[eventType * impl.interruptEntrysPerEventType + i];
|
||||||
|
if (entry.pid != 0) {
|
||||||
|
result.push_back(entry.pid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -126,6 +126,12 @@ constexpr int keyboardBufferSize = 16;
|
|||||||
*/
|
*/
|
||||||
auto buttonPressed(KeyCode keyCode) -> void;
|
auto buttonPressed(KeyCode keyCode) -> void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get registered Prosesses for a given event type.
|
||||||
|
* @param eventType.
|
||||||
|
*/
|
||||||
|
auto getRegisteredProcesses(EventType eventType) -> std::vector<int>;
|
||||||
|
|
||||||
// Shared Memory Layout
|
// Shared Memory Layout
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
// struct ControlRegisters
|
// struct ControlRegisters
|
||||||
|
@ -63,6 +63,9 @@ namespace vkvm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto setPixel(int x, int y, Color color) -> bool {
|
auto setPixel(int x, int y, Color color) -> bool {
|
||||||
|
if(x < 0 || y < 0){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (x > getWidth() || y > getHeight()) {
|
if (x > getWidth() || y > getHeight()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user