.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __echo, __alert, __send, __nb_send, __receive, __nb_receive, __sendrec, __notify
+.define __echo, __notify, __send, __nb_send, __receive, __nb_receive, __sendrec
! See src/kernel/ipc.h for C definitions
SEND = 1
RECEIVE = 2
SENDREC = 3
-NOTIFY = 16
-ALERT = 4
+NOTIFY = 4
ECHO = 8
NB_SEND = 1 + 16 ! flags 0x10 to prevent blocking
NB_RECEIVE = 2 + 16 ! flags 0x10 to prevent blocking
! IPC assembly routines *
!*========================================================================*
! all message passing routines save ebp, but destroy eax and ecx.
-.define __echo, __alert, __send, __nb_send, __receive, __nb_receive, __sendrec, __notify
+.define __echo, __notify, __send, __nb_send, __receive, __nb_receive, __sendrec
.sect .text
__send:
push ebp
ret
__notify:
- push ebp
- mov ebp, esp
- push ebx
- mov eax, SRC_DST(ebp) ! eax = dest-src
- mov ebx, MESSAGE(ebp) ! ebx = message pointer
- mov ecx, NOTIFY ! _notify(srcdest, ptr)
- int SYSVEC ! trap to the kernel
- pop ebx
- pop ebp
- ret
-
-__alert:
push ebp
mov ebp, esp
push ebx
mov eax, SRC_DST(ebp) ! ebx = destination
- mov ecx, ALERT ! _alert(srcdst)
+ mov ecx, NOTIFY ! _notify(srcdst)
int SYSVEC ! trap to the kernel
pop ebx
pop ebp
#include "syslib.h"
-PUBLIC int sys_fork(parent, child, pid)
+PUBLIC int sys_fork(parent, child)
int parent; /* process doing the fork */
int child; /* which proc has been created by the fork */
-int pid; /* process id assigned by MM */
{
/* A process has forked. Tell the kernel. */
m.PR_PPROC_NR = parent;
m.PR_PROC_NR = child;
- m.PR_PID = pid;
return(_taskcall(SYSTASK, SYS_FORK, &m));
}
#include "syslib.h"
-PUBLIC int sys_memset(char c, phys_bytes base, phys_bytes bytes)
+PUBLIC int sys_memset(unsigned long pattern, phys_bytes base, phys_bytes bytes)
{
/* Zero a block of data. */
message mess;
mess.MEM_PTR = (char *) base;
mess.MEM_COUNT = bytes;
- mess.MEM_PATTERN = c;
+ mess.MEM_PATTERN = pattern;
return(_taskcall(SYSTASK, SYS_MEMSET, &mess));
}
/*===========================================================================*
* sys_setalarm *
*===========================================================================*/
-PUBLIC int sys_setalarm(proc_nr, exp_time, abs_time)
-int proc_nr; /* process to send SYN_ALARM message to */
+PUBLIC int sys_setalarm(exp_time, abs_time)
clock_t exp_time; /* expiration time for the alarm */
int abs_time; /* use absolute or relative expiration time */
{
* number can be SELF if the caller doesn't know its process number.
*/
message m;
-
- m.ALRM_PROC_NR = proc_nr; /* receiving process */
m.ALRM_EXP_TIME = exp_time; /* the expiration time */
m.ALRM_ABS_TIME = abs_time; /* time is absolute? */
return _taskcall(SYSTASK, SYS_SETALARM, &m);
/*===========================================================================*
* sys_sigreturn *
*===========================================================================*/
-PUBLIC int sys_sigreturn(proc_nr, sig_ctxt, flags)
+PUBLIC int sys_sigreturn(proc_nr, sig_ctxt)
int proc_nr; /* for which process */
struct sigmsg *sig_ctxt; /* POSIX style handling */
-int flags; /* flags for POSIX handling */
{
message m;
int result;
m.SIG_PROC = proc_nr;
m.SIG_CTXT_PTR = (char *) sig_ctxt;
- m.SIG_FLAGS = flags;
result = _taskcall(SYSTASK, SYS_SIGRETURN, &m);
return(result);
}