minix3/lib/libsys/taskcall.c

21 lines
448 B
C
Raw Normal View History

2020-02-21 00:59:27 +05:30
/* _taskcall() is the same as _syscall() except it returns negative error
* codes directly and not in errno. This is a better interface for PM and
* VFS.
*/
#include <lib.h>
#include <minix/syslib.h>
int _taskcall(who, syscallnr, msgptr)
endpoint_t who;
int syscallnr;
register message *msgptr;
{
int status;
msgptr->m_type = syscallnr;
status = ipc_sendrec(who, msgptr);
if (status != 0) return(status);
return(msgptr->m_type);
}