Line | |
---|
1 | #include "syslib.h"
|
---|
2 |
|
---|
3 | /*===========================================================================*
|
---|
4 | * sys_segctl *
|
---|
5 | *===========================================================================*/
|
---|
6 | PUBLIC int sys_segctl(index, seg, off, phys, size)
|
---|
7 | int *index; /* return index of remote segment */
|
---|
8 | u16_t *seg; /* return segment selector here */
|
---|
9 | vir_bytes *off; /* return offset in segment here */
|
---|
10 | phys_bytes phys; /* physical address to convert */
|
---|
11 | vir_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.