Annotation of Gnu-Mach/kern/ipc_mig.h, revision 1.1.1.2

1.1       root        1: /*
                      2:  * MIG IPC functions
                      3:  * Copyright (C) 2008 Free Software Foundation, Inc.
                      4:  *
                      5:  * This program is free software; you can redistribute it and/or modify
                      6:  * it under the terms of the GNU General Public License as published by
                      7:  * the Free Software Foundation; either version 2, or (at your option)
                      8:  * any later version.
                      9:  *
                     10:  * This program is distributed in the hope that it will be useful,
                     11:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
                     12:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     13:  * GNU General Public License for more details.
                     14:  *
                     15:  * You should have received a copy of the GNU General Public License
                     16:  * along with this program; if not, write to the Free Software
                     17:  * Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
                     18:  *
                     19:  *  Author: Barry deFreese.
                     20:  */
                     21: /*
                     22:  *     MIG IPC functions.
                     23:  *
                     24:  */
                     25: 
                     26: #ifndef _IPC_MIG_H_
                     27: #define _IPC_MIG_H_
                     28: 
                     29: #include <mach/std_types.h>
1.1.1.2 ! root       30: #include <device/device_types.h>
1.1       root       31: 
                     32: /*
                     33:  *  Routine:    mach_msg_send_from_kernel
                     34:  *  Purpose:
                     35:  *      Send a message from the kernel.
                     36:  *
                     37:  *      This is used by the client side of KernelUser interfaces
                     38:  *      to implement SimpleRoutines.  Currently, this includes
                     39:  *      device_reply and memory_object messages.
                     40:  *  Conditions:
                     41:  *      Nothing locked.
                     42:  *  Returns:
                     43:  *      MACH_MSG_SUCCESS    Sent the message.
                     44:  *      MACH_SEND_INVALID_DATA  Bad destination port.
                     45:  */
                     46: extern mach_msg_return_t mach_msg_send_from_kernel(
                     47:     mach_msg_header_t   *msg,
                     48:     mach_msg_size_t     send_size);
                     49: 
                     50: /*
                     51:  *  Routine:    mach_msg_abort_rpc
                     52:  *  Purpose:
                     53:  *      Destroy the thread's ith_rpc_reply port.
                     54:  *      This will interrupt a mach_msg_rpc_from_kernel
                     55:  *      with a MACH_RCV_PORT_DIED return code.
                     56:  *  Conditions:
                     57:  *      Nothing locked.
                     58:  */
                     59: extern void mach_msg_abort_rpc (ipc_thread_t);
                     60: 
                     61: extern mach_msg_return_t mach_msg_rpc_from_kernel(
1.1.1.2 ! root       62:     const mach_msg_header_t *msg,
1.1       root       63:     mach_msg_size_t send_size,
                     64:     mach_msg_size_t reply_size);
                     65: 
1.1.1.2 ! root       66: extern kern_return_t syscall_vm_map(
        !            67:        mach_port_t     target_map,
        !            68:        vm_offset_t     *address,
        !            69:        vm_size_t       size,
        !            70:        vm_offset_t     mask,
        !            71:        boolean_t       anywhere,
        !            72:        mach_port_t     memory_object,
        !            73:        vm_offset_t     offset,
        !            74:        boolean_t       copy,
        !            75:        vm_prot_t       cur_protection,
        !            76:        vm_prot_t       max_protection,
        !            77:        vm_inherit_t    inheritance);
        !            78: 
        !            79: extern kern_return_t syscall_vm_allocate(
        !            80:        mach_port_t             target_map,
        !            81:        vm_offset_t             *address,
        !            82:        vm_size_t               size,
        !            83:        boolean_t               anywhere);
        !            84: 
        !            85: extern kern_return_t syscall_vm_deallocate(
        !            86:        mach_port_t             target_map,
        !            87:        vm_offset_t             start,
        !            88:        vm_size_t               size);
        !            89: 
        !            90: extern kern_return_t syscall_task_create(
        !            91:        mach_port_t     parent_task,
        !            92:        boolean_t       inherit_memory,
        !            93:        mach_port_t     *child_task);
        !            94: 
        !            95: extern kern_return_t syscall_task_terminate(mach_port_t task);
        !            96: 
        !            97: extern kern_return_t syscall_task_suspend(mach_port_t task);
        !            98: 
        !            99: extern kern_return_t syscall_task_set_special_port(
        !           100:        mach_port_t     task,
        !           101:        int             which_port,
        !           102:        mach_port_t     port_name);
        !           103: 
        !           104: extern kern_return_t syscall_mach_port_allocate(
        !           105:        mach_port_t             task,
        !           106:        mach_port_right_t       right,
        !           107:        mach_port_t             *namep);
        !           108: 
        !           109: extern kern_return_t syscall_mach_port_deallocate(
        !           110:        mach_port_t task,
        !           111:        mach_port_t name);
        !           112: 
        !           113: extern kern_return_t syscall_mach_port_insert_right(
        !           114:        mach_port_t task,
        !           115:        mach_port_t name,
        !           116:        mach_port_t right,
        !           117:        mach_msg_type_name_t rightType);
        !           118: 
        !           119: extern kern_return_t syscall_mach_port_allocate_name(
        !           120:        mach_port_t             task,
        !           121:        mach_port_right_t       right,
        !           122:        mach_port_t             name);
        !           123: 
        !           124: extern kern_return_t syscall_thread_depress_abort(mach_port_t thread);
        !           125: 
        !           126: extern io_return_t syscall_device_write_request(
        !           127:                        mach_port_t     device_name,
        !           128:                        mach_port_t     reply_name,
        !           129:                        dev_mode_t      mode,
        !           130:                        recnum_t        recnum,
        !           131:                        vm_offset_t     data,
        !           132:                        vm_size_t       data_count);
        !           133: 
        !           134: io_return_t syscall_device_writev_request(
        !           135:                        mach_port_t     device_name,
        !           136:                        mach_port_t     reply_name,
        !           137:                        dev_mode_t      mode,
        !           138:                        recnum_t        recnum,
        !           139:                        io_buf_vec_t    *iovec,
        !           140:                        vm_size_t       iocount);
        !           141: 
1.1       root      142: #endif /* _IPC_MIG_H_ */

unix.superglobalmegacorp.com

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