 9df1183b94
			
		
	
	
		9df1183b94
		
	
	
	
	
		
			
			. added safecopies.c: these are library functions to maintain grant tables in own address space . sys_safecopy.c: interfaces to kernel calls to perform safe copy functions in from or to foreign process . changes in i/o fields (type merged with request) reflected in library functions (sys_out.c, sys_vinb.c, sys_vinl.c, sys_vinw.c, sys_voutb.c, sys_voutl.c, sys_voutw.c) . type merged with request in sys_sdevio, also now accepts offset which is used when a grant is specified (the _DIO_SAFE subtype) . system printf() function changed to send DIAGNOSTICS_S messages, which specify a grant id instead of a direct address for the buffer to be printed; tty and log can then safecopy the buffer
		
			
				
	
	
		
			22 lines
		
	
	
		
			618 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			618 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #include "syslib.h"
 | |
| 
 | |
| /*===========================================================================*
 | |
|  *                                sys_in				     *
 | |
|  *===========================================================================*/
 | |
| PUBLIC int sys_in(port, value, type)
 | |
| int port; 				/* port address to read from */
 | |
| unsigned long *value;			/* pointer where to store value */
 | |
| int type;				/* byte, word, long */
 | |
| {
 | |
|     message m_io;
 | |
|     int result;
 | |
| 
 | |
|     m_io.DIO_REQUEST = _DIO_INPUT | type;
 | |
|     m_io.DIO_PORT = port;
 | |
| 
 | |
|     result = _taskcall(SYSTASK, SYS_DEVIO, &m_io);
 | |
|     *value = m_io.DIO_VALUE;
 | |
|     return(result);
 | |
| }
 | |
| 
 |