From: Tomas Hruby Date: Tue, 9 Feb 2010 15:13:07 +0000 (+0000) Subject: Sys calls are called ipc calls now X-Git-Tag: v3.1.7~304 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/ddns-confgen.html?a=commitdiff_plain;h=b14a86ca5cf0f5a30204aa14897e785ed6f4b5f1;p=minix.git Sys calls are called ipc calls now - the syscalls are pretty much just ipc calls, however, sendrec() is used to implement system task (sys) calls - sendrec() won't be used anymore for this, therefore ipc calls will become pure ipc calls --- diff --git a/kernel/arch/i386/apic.c b/kernel/arch/i386/apic.c index ae169cea0..2b3493606 100644 --- a/kernel/arch/i386/apic.c +++ b/kernel/arch/i386/apic.c @@ -407,7 +407,7 @@ PRIVATE struct gate_table_s gate_table_ioapic[] = { }; PRIVATE struct gate_table_s gate_table_common[] = { - { syscall_entry, SYS386_VECTOR, USER_PRIVILEGE }, + { ipc_entry, SYS386_VECTOR, USER_PRIVILEGE }, { level0_call, LEVEL0_VECTOR, TASK_PRIVILEGE }, { NULL, 0, 0} }; diff --git a/kernel/arch/i386/mpx386.S b/kernel/arch/i386/mpx386.S index 896d84afd..d67ba0acc 100644 --- a/kernel/arch/i386/mpx386.S +++ b/kernel/arch/i386/mpx386.S @@ -380,8 +380,8 @@ hwint15: * syscall is only from a process to kernel */ .balign 16 -.globl syscall_entry -syscall_entry: +.globl ipc_entry +ipc_entry: SAVE_PROCESS_CTX(0) @@ -401,7 +401,7 @@ syscall_entry: /* for stack trace */ movl $0, %ebp - call sys_call + call do_ipc /* restore the current process pointer and save the return value */ add $4 * 4, %esp diff --git a/kernel/arch/i386/protect.c b/kernel/arch/i386/protect.c index 8fc96f88b..c5ffc626d 100644 --- a/kernel/arch/i386/protect.c +++ b/kernel/arch/i386/protect.c @@ -212,7 +212,7 @@ PUBLIC void idt_init(void) { alignment_check, ALIGNMENT_CHECK_VECTOR, INTR_PRIVILEGE }, { machine_check, MACHINE_CHECK_VECTOR, INTR_PRIVILEGE }, { simd_exception, SIMD_EXCEPTION_VECTOR, INTR_PRIVILEGE }, - { syscall_entry, SYS386_VECTOR, USER_PRIVILEGE },/* 386 system call */ + { ipc_entry, SYS386_VECTOR, USER_PRIVILEGE },/* 386 system call */ { level0_call, LEVEL0_VECTOR, TASK_PRIVILEGE }, { NULL, 0, 0} }; diff --git a/kernel/arch/i386/proto.h b/kernel/arch/i386/proto.h index f7c1b729c..3a28cb1bb 100644 --- a/kernel/arch/i386/proto.h +++ b/kernel/arch/i386/proto.h @@ -43,7 +43,7 @@ void _PROTOTYPE( simd_exception, (void) ); /* Software interrupt handlers, in numerical order. */ _PROTOTYPE( void trp, (void) ); -_PROTOTYPE( void syscall_entry, (void) ); +_PROTOTYPE( void ipc_entry, (void) ); _PROTOTYPE( void level0_call, (void) ); /* memory.c */ diff --git a/kernel/arch/i386/system.c b/kernel/arch/i386/system.c index 2154624aa..703056cc3 100644 --- a/kernel/arch/i386/system.c +++ b/kernel/arch/i386/system.c @@ -477,11 +477,11 @@ PUBLIC void arch_do_syscall(struct proc *proc) m_ptr = (message *) proc->p_reg.bx; bit_map = proc->p_reg.dx; - /* sys_call() expects the given process's memory to be accessible. */ + /* do_ipc() expects the given process's memory to be accessible. */ vm_set_cr3(proc); /* Make the system call, for real this time. */ - proc->p_reg.retreg = sys_call(call_nr, src_dst_e, m_ptr, bit_map); + proc->p_reg.retreg = do_ipc(call_nr, src_dst_e, m_ptr, bit_map); } PUBLIC struct proc * arch_finish_schedcheck(void) diff --git a/kernel/proc.c b/kernel/proc.c index 4ee6592ab..99a2b202d 100644 --- a/kernel/proc.c +++ b/kernel/proc.c @@ -283,7 +283,7 @@ check_misc_flags: /*===========================================================================* * sys_call * *===========================================================================*/ -PUBLIC int sys_call(call_nr, src_dst_e, m_ptr, bit_map) +PUBLIC int do_ipc(call_nr, src_dst_e, m_ptr, bit_map) int call_nr; /* system call number and flags */ int src_dst_e; /* src to receive from or dst to send to */ message *m_ptr; /* pointer to message in the caller's space */ diff --git a/kernel/proto.h b/kernel/proto.h index 48a88453e..69c4d9f07 100644 --- a/kernel/proto.h +++ b/kernel/proto.h @@ -28,7 +28,7 @@ _PROTOTYPE( int kprintf, (const char *fmt, ...) ); _PROTOTYPE( void minix_panic, (char *s, int n) ); /* proc.c */ -_PROTOTYPE( int sys_call, (int call_nr, int src_dst, +_PROTOTYPE( int do_ipc, (int call_nr, int src_dst, message *m_ptr, long bit_map) ); _PROTOTYPE( int lock_notify, (int src, int dst) ); _PROTOTYPE( int mini_notify, (struct proc *src, endpoint_t dst) );