Annotation of Gnu-Mach/include/device/device.defs, revision 1.1.1.3

1.1       root        1: /* 
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
                      4:  * All Rights Reserved.
                      5:  * 
                      6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
                     11:  * 
                     12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     15:  * 
                     16:  * Carnegie Mellon requests users of this software to return to
                     17:  * 
                     18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
                     22:  * 
                     23:  * any improvements or extensions that they make and grant Carnegie Mellon
                     24:  * the rights to redistribute these changes.
                     25:  */
                     26: /*
                     27:  * File:       device/device.defs
                     28:  * Author:     Douglas Orr
                     29:  *             Feb 10, 1988
                     30:  * Abstract:
                     31:  *     Mach device support.  Mach devices are accessed through
                     32:  *     block and character device interfaces to the kernel.
                     33:  */
                     34: 
                     35: subsystem
                     36: #if    KERNEL_SERVER
                     37:          KernelServer
                     38: #endif
                     39:                       device 2800;
                     40: 
                     41: #include <mach/std_types.defs>
                     42: #include <mach/mach_types.defs>
                     43: #include <device/device_types.defs>
                     44: 
                     45: serverprefix   ds_;
                     46: 
                     47: type reply_port_t = MACH_MSG_TYPE_MAKE_SEND_ONCE | polymorphic
1.1.1.3 ! root       48:        ctype: mach_port_t
        !            49: #ifndef        KERNEL_SERVER
        !            50: #ifdef MACH_PAYLOAD_TO_PORT
        !            51:                intranpayload: mach_port_t MACH_PAYLOAD_TO_PORT
        !            52: #endif /* MACH_PAYLOAD_TO_PORT */
        !            53: #endif /* KERNEL_SERVER */
        !            54: ;
1.1       root       55: 
                     56: routine device_open(
                     57:                master_port     : mach_port_t;
                     58:        sreplyport reply_port   : reply_port_t;
                     59:                mode            : dev_mode_t;
                     60:                name            : dev_name_t;
1.1.1.3 ! root       61:        out     device          : device_t =
        !            62:                                        MACH_MSG_TYPE_PORT_SEND
        !            63:                                        ctype: mach_port_t
        !            64: #if    KERNEL_SERVER
        !            65:                outtran: mach_port_t convert_device_to_port(device_t)
        !            66: #else
        !            67: #ifdef DEVICE_OUTTRAN
        !            68:                outtran: DEVICE_OUTTRAN
        !            69: #endif
        !            70: #endif /* KERNEL_SERVER */
1.1       root       71:        );
                     72: 
                     73: routine device_close(
                     74:                device          : device_t
                     75:        );
                     76: 
                     77: routine device_write(
                     78:                device          : device_t;
                     79:        sreplyport reply_port   : reply_port_t;
                     80:        in      mode            : dev_mode_t;
                     81:        in      recnum          : recnum_t;
                     82:        in      data            : io_buf_ptr_t;
                     83:        out     bytes_written   : int
                     84:        );
                     85: 
                     86: routine device_write_inband(
                     87:                device          : device_t;
                     88:        sreplyport reply_port   : reply_port_t;
                     89:        in      mode            : dev_mode_t;
                     90:        in      recnum          : recnum_t;
                     91:        in      data            : io_buf_ptr_inband_t;
                     92:        out     bytes_written   : int
                     93:        );
                     94: 
                     95: routine        device_read(
                     96:                device          : device_t;
                     97:        sreplyport reply_port   : reply_port_t;
                     98:        in      mode            : dev_mode_t;
                     99:        in      recnum          : recnum_t;
                    100:        in      bytes_wanted    : int;
                    101:        out     data            : io_buf_ptr_t
                    102:        );
                    103: 
                    104: routine        device_read_inband(
                    105:                device          : device_t;
                    106:        sreplyport reply_port   : reply_port_t;
                    107:        in      mode            : dev_mode_t;
                    108:        in      recnum          : recnum_t;
                    109:        in      bytes_wanted    : int;
                    110:        out     data            : io_buf_ptr_inband_t
                    111:        );
                    112: 
1.1.1.2   root      113: skip;  /* old xxx_device_set_status */
                    114: skip;  /* old xxx_device_get_status */
                    115: skip;  /* old xxx_device_set_filter*/
1.1       root      116: 
                    117: routine device_map(
                    118:                device          : device_t;
                    119:        in      prot            : vm_prot_t;
                    120:        in      offset          : vm_offset_t;
                    121:        in      size            : vm_size_t;
                    122:        out     pager           : memory_object_t;
                    123:        in      unmap           : int
                    124:        );
                    125: 
                    126: routine        device_set_status(
                    127:                device          : device_t;
                    128:        in      flavor          : dev_flavor_t;
                    129:        in      status          : dev_status_t
                    130:        );
                    131: 
                    132: routine        device_get_status(
                    133:                device          : device_t;
                    134:        in      flavor          : dev_flavor_t;
                    135:        out     status          : dev_status_t, CountInOut
                    136:        );
                    137: 
                    138: routine device_set_filter(
                    139:                device          : device_t;
                    140:        in      receive_port    : mach_port_send_t;
                    141:        in      priority        : int;
                    142:        in      filter          : filter_array_t
                    143:        );
                    144: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.