VM: simplify slab allocator
[minix.git] / lib / libsys / sys_in.c
blob3044e77f88df18ea5474565a5750fb4d547a8d95
1 #include "syslib.h"
3 /*===========================================================================*
4 * sys_in *
5 *===========================================================================*/
6 int sys_in(port, value, type)
7 int port; /* port address to read from */
8 u32_t *value; /* pointer where to store value */
9 int type; /* byte, word, long */
11 message m_io;
12 int result;
14 m_io.DIO_REQUEST = _DIO_INPUT | type;
15 m_io.DIO_PORT = port;
17 result = _kernel_call(SYS_DEVIO, &m_io);
18 *value = m_io.DIO_VALUE;
19 return(result);