From: Philip Homburg Date: Mon, 23 Apr 2007 12:11:03 +0000 (+0000) Subject: Added sendnb and senda, removed echo and _ipcnew.s. X-Git-Tag: v3.1.4~433 X-Git-Url: http://zhaoyanbai.com/repos/addsub.png?a=commitdiff_plain;h=e9899f3c863d8a247990401ea1541ea5487fa218;p=minix.git Added sendnb and senda, removed echo and _ipcnew.s. --- diff --git a/lib/i386/rts/Makefile.in b/lib/i386/rts/Makefile.in index fbe62872c..979dc8faa 100644 --- a/lib/i386/rts/Makefile.in +++ b/lib/i386/rts/Makefile.in @@ -7,7 +7,6 @@ LIBRARIES=libc libc_FILES=" \ __sigreturn.s \ _ipc.s \ - _ipcnew.s \ brksize.s" STARTFILES="\ diff --git a/lib/i386/rts/_ipc.s b/lib/i386/rts/_ipc.s index 80a32bcd9..4c60c7451 100755 --- a/lib/i386/rts/_ipc.s +++ b/lib/i386/rts/_ipc.s @@ -1,23 +1,24 @@ .sect .text; .sect .rom; .sect .data; .sect .bss -.define __echo, __notify, __send, __receive, __sendrec +.define __notify, __send, __senda, __sendnb, __receive, __sendrec ! See src/kernel/ipc.h for C definitions SEND = 1 RECEIVE = 2 SENDREC = 3 NOTIFY = 4 -ECHO = 8 +SENDNB = 5 +SENDA = 16 SYSVEC = 33 ! trap to kernel SRC_DST = 8 ! source/ destination process -ECHO_MESS = 8 ! echo doesn't have SRC_DST +MSGTAB = 8 ! message table MESSAGE = 12 ! message pointer +TABCOUNT = 12 ! number of entries in message table !*========================================================================* ! IPC assembly routines * !*========================================================================* ! all message passing routines save ebp, but destroy eax and ecx. -.define __echo, __notify, __send, __receive, __sendrec .sect .text __send: push ebp @@ -66,14 +67,26 @@ __notify: pop ebp ret -__echo: +__sendnb: push ebp mov ebp, esp push ebx - mov ebx, ECHO_MESS(ebp) ! ebx = message pointer - mov ecx, ECHO ! _echo(srcdest, ptr) + mov eax, SRC_DST(ebp) ! eax = dest-src + mov ebx, MESSAGE(ebp) ! ebx = message pointer + mov ecx, SENDNB ! _sendnb(dest, ptr) int SYSVEC ! trap to the kernel pop ebx pop ebp ret +__senda: + push ebp + mov ebp, esp + push ebx + mov eax, TABCOUNT(ebp) ! eax = count + mov ebx, MSGTAB(ebp) ! ebx = table + mov ecx, SENDA ! _senda(table, count) + int SYSVEC ! trap to the kernel + pop ebx + pop ebp + ret diff --git a/lib/i386/rts/_ipcnew.s b/lib/i386/rts/_ipcnew.s deleted file mode 100755 index 33d89a4db..000000000 --- a/lib/i386/rts/_ipcnew.s +++ /dev/null @@ -1,75 +0,0 @@ -.sect .text; .sect .rom; .sect .data; .sect .bss -.define __ipc_request, __ipc_reply, __ipc_notify, __ipc_receive - -! See src/kernel/ipc.h for C definitions. -IPC_REQUEST = 16 ! each gets a distinct bit -IPC_REPLY = 32 -IPC_NOTIFY = 64 -IPC_RECEIVE = 128 - -SYSVEC = 33 ! trap to kernel - -! Offsets of arguments relative to stack pointer. -SRC_DST = 8 ! source/ destination process -SEND_MSG = 12 ! message pointer for sending -EVENT_SET = 12 ! notification event set -RECV_MSG = 16 ! message pointer for receiving - - -!*========================================================================* -! IPC assembly routines * -!*========================================================================* -! all message passing routines save ebp, but destroy eax, ecx, and edx. -.define __ipc_request, __ipc_reply, __ipc_notify, __ipc_receive -.sect .text - -__ipc_request: - push ebp - mov ebp, esp - push ebx - mov eax, SRC_DST(ebp) ! eax = destination - mov ebx, SEND_MSG(ebp) ! ebx = message pointer - mov ecx, IPC_REQUEST ! _ipc_request(dst, ptr) - int SYSVEC ! trap to the kernel - pop ebx - pop ebp - ret - -__ipc_reply: - push ebp - mov ebp, esp - push ebx - mov eax, SRC_DST(ebp) ! eax = destination - mov ebx, SEND_MSG(ebp) ! ebx = message pointer - mov ecx, IPC_REPLY ! _ipc_reply(dst, ptr) - int SYSVEC ! trap to the kernel - pop ebx - pop ebp - ret - -__ipc_receive: - push ebp - mov ebp, esp - push ebx - mov eax, SRC_DST(ebp) ! eax = source - mov edx, EVENT_SET(ebp) ! ebx = event set - mov ebx, RCV_MSG(ebp) ! ebx = message pointer - mov ecx, IPC_RECEIVE ! _ipc_receive(src, events, ptr) - int SYSVEC ! trap to the kernel - pop ebx - pop ebp - ret - -__ipc_notify: - push ebp - mov ebp, esp - push ebx - mov eax, SRC_DST(ebp) ! ebx = destination - mov edx, EVENT_SET(ebp) ! edx = event set - mov ecx, IPC_NOTIFY ! _ipc_notify(dst, events) - int SYSVEC ! trap to the kernel - pop ebx - pop ebp - ret - -