forked from Stichting-MINIX-Research-Foundation/minix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsys_segctl.c
More file actions
24 lines (21 loc) · 778 Bytes
/
Copy pathsys_segctl.c
File metadata and controls
24 lines (21 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "syslib.h"
/*===========================================================================*
* sys_segctl *
*===========================================================================*/
PUBLIC int sys_segctl(index, seg, off, phys, size)
int *index; /* return index of remote segment */
u16_t *seg; /* return segment selector here */
vir_bytes *off; /* return offset in segment here */
phys_bytes phys; /* physical address to convert */
vir_bytes size; /* size of segment */
{
message m;
int s;
m.SEG_PHYS = phys;
m.SEG_SIZE = size;
s = _taskcall(SYSTASK, SYS_SEGCTL, &m);
*index = (int) m.SEG_INDEX;
*seg = (u16_t) m.SEG_SELECT;
*off = (vir_bytes) m.SEG_OFFSET;
return s;
}