syscall.c

Go to the documentation of this file.
00001 #include <lib.h>
00002 
00003 PUBLIC int _syscall(who, syscallnr, msgptr)
00004 int who;
00005 int syscallnr;
00006 register message *msgptr;
00007 {
00008   int status;
00009 
00010   msgptr->m_type = syscallnr;
00011   status = _sendrec(who, msgptr);
00012   if (status != 0) {
00013         /* 'sendrec' itself failed. */
00014         /* XXX - strerror doesn't know all the codes */
00015         msgptr->m_type = status;
00016   }
00017   if (msgptr->m_type < 0) {
00018         errno = -msgptr->m_type;
00019         return(-1);
00020   }
00021   return(msgptr->m_type);
00022 }

Generated on Fri Apr 14 22:57:27 2006 for minix by  doxygen 1.4.6