xref: /minix/minix/lib/libsys/taskcall.c (revision 7f5f010b)
1 /* _taskcall() is the same as _syscall() except it returns negative error
2  * codes directly and not in errno.  This is a better interface for PM and
3  * VFS.
4  */
5 
6 #include <lib.h>
7 #include <minix/syslib.h>
8 
9 int _taskcall(who, syscallnr, msgptr)
10 endpoint_t who;
11 int syscallnr;
12 register message *msgptr;
13 {
14   int status;
15 
16   msgptr->m_type = syscallnr;
17   status = ipc_sendrec(who, msgptr);
18   if (status != 0) return(status);
19   return(msgptr->m_type);
20 }
21