8000 minix/lib/other/syscall.c at R3.1.0 · devinblood/minix · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
executable file
·
22 lines (20 loc) · 424 Bytes

syscall.c

File metadata and controls

executable file
·
22 lines (20 loc) · 424 Bytes
#include <lib.h>
PUBLIC int _syscall(who, syscallnr, msgptr)
int who;
int syscallnr;
register message *msgptr;
{
int status;
msgptr->m_type = syscallnr;
status = _sendrec(who, msgptr);
if (status != 0) {
/* 'sendrec' itself failed. */
/* XXX - strerror doesn't know all the codes */
msgptr->m_type = status;
}
if (msgptr->m_type < 0) {
errno = -msgptr->m_type;
return(-1);
}
return(msgptr->m_type);
}
0