Home | History | Annotate | Line # | Download | only in include
apcall.h revision 1.2
      1  1.2  tsubai /*	$NetBSD: apcall.h,v 1.2 1999/12/23 06:52:30 tsubai Exp $	*/
      2  1.1  tsubai 
      3  1.1  tsubai /*-
      4  1.1  tsubai  * Copyright (C) 1999 SHIMIZU Ryo.  All rights reserved.
      5  1.1  tsubai  *
      6  1.1  tsubai  * Redistribution and use in source and binary forms, with or without
      7  1.1  tsubai  * modification, are permitted provided that the following conditions
      8  1.1  tsubai  * are met:
      9  1.1  tsubai  * 1. Redistributions of source code must retain the above copyright
     10  1.1  tsubai  *    notice, this list of conditions and the following disclaimer.
     11  1.1  tsubai  * 2. Redistributions in binary form must reproduce the above copyright
     12  1.1  tsubai  *    notice, this list of conditions and the following disclaimer in the
     13  1.1  tsubai  *    documentation and/or other materials provided with the distribution.
     14  1.1  tsubai  * 3. The name of the author may not be used to endorse or promote products
     15  1.1  tsubai  *    derived from this software without specific prior written permission.
     16  1.1  tsubai  *
     17  1.1  tsubai  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     18  1.1  tsubai  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     19  1.1  tsubai  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     20  1.1  tsubai  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     21  1.1  tsubai  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     22  1.1  tsubai  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     23  1.1  tsubai  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     24  1.1  tsubai  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     25  1.1  tsubai  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     26  1.1  tsubai  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     27  1.1  tsubai  */
     28  1.1  tsubai 
     29  1.1  tsubai #ifndef __MACHINE_APCALL_H__
     30  1.1  tsubai #define __MACHINE_APCALL_H__
     31  1.1  tsubai 
     32  1.1  tsubai #include <machine/apbus.h>
     33  1.1  tsubai 
     34  1.2  tsubai #define APCALL (*(_sip->apbsi_call))
     35  1.1  tsubai 
     36  1.1  tsubai #define	APCALL_EXIT		1
     37  1.1  tsubai #define	APCALL_READ		3
     38  1.1  tsubai #define	APCALL_WRITE		4
     39  1.1  tsubai #define	APCALL_OPEN		5
     40  1.1  tsubai #define	APCALL_CLOSE		6
     41  1.1  tsubai #define	APCALL_LSEEK		19
     42  1.1  tsubai #define	APCALL_IOCTL		54
     43  1.1  tsubai #define	APCALL_GETENV		1004
     44  1.2  tsubai #define	APCALL_FLUSHCACHE	1006
     45  1.2  tsubai #define	APCALL_GETTIMEOFDAY	1012
     46  1.1  tsubai 
     47  1.1  tsubai #define	APIOCGIFHWADDR		9200	/* get hardware address */
     48  1.1  tsubai 
     49  1.1  tsubai #define	apcall_exit(a)		APCALL(APCALL_EXIT,(a))
     50  1.1  tsubai #define	apcall_read(a,b,c)	APCALL(APCALL_READ,(a),(b),(c))
     51  1.1  tsubai #define	apcall_write(a,b,c)	APCALL(APCALL_WRITE,(a),(b),(c))
     52  1.1  tsubai #define	apcall_open(a,b)	APCALL(APCALL_OPEN,(a),(b))
     53  1.1  tsubai #define	apcall_close(a)		APCALL(APCALL_CLOSE,(a))
     54  1.1  tsubai #define	apcall_lseek(a,b,c)	APCALL(APCALL_LSEEK,(a),(b),(c))
     55  1.1  tsubai #define	apcall_ioctl(a,b,c)	APCALL(APCALL_IOCTL,(a),(b),(c))
     56  1.1  tsubai #define	apcall_getenv(a)	APCALL(APCALL_GETENV,(a))
     57  1.2  tsubai #define	apcall_flushcache()	APCALL(APCALL_FLUSHCACHE)
     58  1.2  tsubai #define	apcall_gettimeofday(a)	APCALL(APCALL_GETTIMEOFDAY,(a))
     59  1.1  tsubai 
     60  1.1  tsubai #endif	/* !__MACHINE_APCALL_H__ */
     61