More unfinished work on kernel API
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
#define PROCESS_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include "map.hpp"
|
||||
|
||||
#include "message.hpp"
|
||||
|
||||
namespace kernelns
|
||||
{
|
||||
@@ -17,16 +18,35 @@ public:
|
||||
|
||||
Process();
|
||||
|
||||
unsigned int getID() const;
|
||||
|
||||
bool map(void* location, size_t size);
|
||||
|
||||
/**
|
||||
* @brief If the specified region is mapped and does not overlap a shared
|
||||
* or private block, or the kernel, removes that region from the process's
|
||||
* internal memory map. If the specified region overlaps an unmapped region,
|
||||
* a shared or private block, or the kernel, the object goes unmodified.
|
||||
* This method does not affect the page tables in any way, only the process's
|
||||
* internal bookkeeping.
|
||||
*
|
||||
* @param location
|
||||
* @param size
|
||||
* @return true if the memory map was sucessfully updated
|
||||
* @return false if the memory map was not modified
|
||||
*/
|
||||
bool unmap(void* location, size_t size);
|
||||
|
||||
bool hasSharedBlock(unsigned int blockID) const;
|
||||
|
||||
bool hasPhysicalBlock(unsigned int blockID) const;
|
||||
|
||||
void pushMessage(Message* message);
|
||||
|
||||
Message* popMessage();
|
||||
|
||||
private:
|
||||
|
||||
Map<unsigned int, MemoryBlock&> m_sharedBlocks;
|
||||
|
||||
Map<unsigned int, MemoryBlock&> m_physicalBlocks;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user