source: trunk/minix/lib/syslib/sys_segctl.c@ 9

Last change on this file since 9 was 9, checked in by Mattia Monga, 13 years ago

Minix 3.1.2a

File size: 778 bytes
Line 
1#include "syslib.h"
2
3/*===========================================================================*
4 * sys_segctl *
5 *===========================================================================*/
6PUBLIC int sys_segctl(index, seg, off, phys, size)
7int *index; /* return index of remote segment */
8u16_t *seg; /* return segment selector here */
9vir_bytes *off; /* return offset in segment here */
10phys_bytes phys; /* physical address to convert */
11vir_bytes size; /* size of segment */
12{
13 message m;
14 int s;
15 m.SEG_PHYS = phys;
16 m.SEG_SIZE = size;
17 s = _taskcall(SYSTASK, SYS_SEGCTL, &m);
18 *index = (int) m.SEG_INDEX;
19 *seg = (u16_t) m.SEG_SELECT;
20 *off = (vir_bytes) m.SEG_OFFSET;
21 return s;
22}
23
24
Note: See TracBrowser for help on using the repository browser.