2010-05-05 13:35:04 +02:00
|
|
|
|
|
|
|
#include "syslib.h"
|
|
|
|
|
|
|
|
#include <minix/vm.h>
|
|
|
|
#include <minix/u64.h>
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* vm_forgetblocks *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
void vm_forgetblocks(void)
|
2010-05-05 13:35:04 +02:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
_taskcall(VM_PROC_NR, VM_FORGETBLOCKS, &m);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* vm_forgetblock *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int vm_forgetblock(u64_t id)
|
2010-05-05 13:35:04 +02:00
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
|
|
|
m.VMFB_IDHI = ex64hi(id);
|
|
|
|
m.VMFB_IDLO = ex64lo(id);
|
|
|
|
|
|
|
|
return _taskcall(VM_PROC_NR, VM_FORGETBLOCK, &m);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* vm_yield_block_get_block *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int vm_yield_block_get_block(u64_t yieldid, u64_t getid,
|
2010-05-05 13:35:04 +02:00
|
|
|
void *mem, vir_bytes len)
|
|
|
|
{
|
|
|
|
message m;
|
|
|
|
|
|
|
|
m.VMYBGB_VADDR = mem;
|
|
|
|
m.VMYBGB_GETIDHI = ex64hi(getid);
|
|
|
|
m.VMYBGB_GETIDLO = ex64lo(getid);
|
|
|
|
m.VMYBGB_LEN = len;
|
|
|
|
m.VMYBGB_YIELDIDHI = ex64hi(yieldid);
|
|
|
|
m.VMYBGB_YIELDIDLO = ex64lo(yieldid);
|
|
|
|
|
|
|
|
return _taskcall(VM_PROC_NR, VM_YIELDBLOCKGETBLOCK, &m);
|
|
|
|
}
|
|
|
|
|