* Also change _orig to _intr for clarity * Cleaned up {IPC,KER}VEC * Renamed _minix_kernel_info_struct to get_minix_kerninfo * Merged _senda.S into _ipc.S * Moved into separate files get_minix_kerninfo and _do_kernel_call * Adapted do_kernel_call to follow same _ convention as ipc functions * Drop patches in libc/net/send.c and libc/include/namespace.h Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
25 lines
504 B
C
25 lines
504 B
C
#include <sys/cdefs.h>
|
|
#include <lib.h>
|
|
#include "namespace.h"
|
|
|
|
#ifdef __weak_alias
|
|
__weak_alias(syscall, _syscall)
|
|
#endif
|
|
|
|
int _syscall(endpoint_t who, int syscallnr, message *msgptr)
|
|
{
|
|
int status;
|
|
|
|
msgptr->m_type = syscallnr;
|
|
status = ipc_sendrec(who, msgptr);
|
|
if (status != 0) {
|
|
/* 'ipc_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);
|
|
}
|