machine/ipcconst.h for arch-specific constants
This commit is contained in:
parent
e4ac80eb60
commit
9a9d555f56
6 changed files with 14 additions and 8 deletions
|
@ -14,7 +14,7 @@ INCS= ansi.h asm.h bswap.h byte_swap.h cdefs.h \
|
|||
interrupt.h memory.h multiboot.h partition.h \
|
||||
pci.h pci_amd.h pci_intel.h pci_sis.h pci_via.h \
|
||||
ports.h stackframe.h vm.h elf.h elf_machdep.h mutex.h \
|
||||
disklabel.h
|
||||
disklabel.h ipcconst.h
|
||||
|
||||
|
||||
.include <bsd.kinc.mk>
|
||||
|
|
9
include/arch/i386/include/ipcconst.h
Normal file
9
include/arch/i386/include/ipcconst.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef _I386_IPCCONST_H_
|
||||
#define _I386_IPCCONST_H_
|
||||
|
||||
#define KERVEC 32 /* syscall trap to kernel */
|
||||
#define IPCVEC 33 /* ipc trap to kernel */
|
||||
|
||||
#define IPC_STATUS_REG bx
|
||||
|
||||
#endif /* _I386_IPCCONST_H_ */
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _IPC_CONST_H
|
||||
#define _IPC_CONST_H
|
||||
|
||||
#include <machine/ipcconst.h>
|
||||
|
||||
/* System call numbers that are passed when trapping to the kernel. */
|
||||
#define SEND 1 /* blocking send */
|
||||
#define RECEIVE 2 /* blocking receive */
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* These definitions are used in the file proc.c.
|
||||
*/
|
||||
#include <minix/com.h>
|
||||
#include <minix/ipcconst.h>
|
||||
|
||||
/* Masks and flags for system calls. */
|
||||
#define NON_BLOCKING 0x0080 /* do not block if target not ready */
|
||||
|
@ -15,7 +16,6 @@
|
|||
(target->p_getfrom_e == ANY || target->p_getfrom_e == source_ep))
|
||||
|
||||
/* IPC status code macros. */
|
||||
#define IPC_STATUS_REG bx
|
||||
#define IPC_STATUS_GET(p) ((p)->p_reg.IPC_STATUS_REG)
|
||||
#define IPC_STATUS_CLEAR(p) ((p)->p_reg.IPC_STATUS_REG = 0)
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
#include <minix/ipcconst.h>
|
||||
#include <machine/asm.h>
|
||||
|
||||
IPCVEC = 33 /* ipc trap to kernel */
|
||||
KERVEC = 32 /* syscall trap to kernel */
|
||||
|
||||
SRC_DST = 8 /* source/ destination process */
|
||||
MESSAGE = 12 /* message pointer */
|
||||
STATUS = 16 /* status pointer */
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#include <minix/ipcconst.h>
|
||||
#include <machine/asm.h>
|
||||
|
||||
SYSVEC = 33
|
||||
|
||||
MSGTAB = 8 /* message table */
|
||||
TABCOUNT = 12 /* number of entries in message table */
|
||||
|
||||
|
@ -13,7 +11,7 @@ ENTRY(_senda)
|
|||
movl TABCOUNT(%ebp), %eax /* eax = count */
|
||||
movl MSGTAB(%ebp), %ebx /* ebx = table */
|
||||
movl $SENDA, %ecx /* _senda(table, count) */
|
||||
int $SYSVEC /* trap to the kernel */
|
||||
int $IPCVEC /* trap to the kernel */
|
||||
pop %ebx
|
||||
pop %ebp
|
||||
ret
|
||||
|
|
Loading…
Reference in a new issue