Basic VM and other minor improvements.
Not complete, probably not fully debugged or optimized.
This commit is contained in:
20
kernel/vm.h
Normal file
20
kernel/vm.h
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
#ifndef _VM_H
|
||||
#define _VM_H 1
|
||||
|
||||
#define CHECKRANGE_OR_SUSPEND(pr, start, length, wr) { int mr; \
|
||||
if(vm_running && (mr=vm_checkrange(proc_addr(who_p), pr, start, length, wr, 0)) != OK) { \
|
||||
return mr; \
|
||||
} }
|
||||
|
||||
#define CHECKRANGE(pr, start, length, wr) \
|
||||
vm_checkrange(proc_addr(who_p), pr, start, length, wr, 1)
|
||||
|
||||
/* Pseudo error code indicating a process request has to be
|
||||
* restarted after an OK from VM.
|
||||
*/
|
||||
#define VMSUSPEND -996
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user