Annotation of Gnu-Mach/include/mach/gnumach.defs, revision 1.1.1.2

1.1       root        1: /*
                      2:  * Copyright (C) 2012 Free Software Foundation
                      3:  *
                      4:  * This program is free software; you can redistribute it and/or modify
                      5:  * it under the terms of the GNU General Public License as published by
                      6:  * the Free Software Foundation; either version 2 of the License, or
                      7:  * (at your option) any later version.
                      8:  *
                      9:  * This program is distributed in the hope that it will be useful,
                     10:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
                     11:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     12:  * GNU General Public License for more details.
                     13:  *
                     14:  * You should have received a copy of the GNU General Public License along
                     15:  * with this program; if not, write to the Free Software Foundation, Inc.,
                     16:  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
                     17:  */
                     18: 
                     19: subsystem
                     20: #if    KERNEL_SERVER
                     21:          KernelServer
                     22: #endif /* KERNEL_SERVER */
                     23: #if    KERNEL_USER
                     24:          KernelUser
                     25: #endif /* KERNEL_USER */
                     26:                       gnumach 4200;
                     27: 
                     28: #include <mach/std_types.defs>
                     29: #include <mach/mach_types.defs>
1.1.1.2 ! root       30: #include <mach_debug/mach_debug_types.defs>
        !            31: 
        !            32: #ifdef GNUMACH_IMPORTS
        !            33: GNUMACH_IMPORTS
        !            34: #endif
1.1       root       35: 
                     36: type vm_cache_statistics_data_t = struct[11] of integer_t;
                     37: 
                     38: /*
                     39:  * Return page cache statistics for the host on which the target task
                     40:  * resides.
                     41:  */
                     42: routine vm_cache_statistics(
                     43:                target_task     : vm_task_t;
                     44:        out     vm_cache_stats  : vm_cache_statistics_data_t);
1.1.1.2 ! root       45: 
        !            46: /*
        !            47:  * Terminate a thread and release rights and memory.
        !            48:  *
        !            49:  * Intended to be used by threading libraries to provide a clean way for
        !            50:  * threads to terminate themselves. The resources a thread wouldn't be able
        !            51:  * to release without this call when terminating itself are its
        !            52:  * last reference to its kernel port, its reply port, and its stack.
        !            53:  *
        !            54:  * This call is semantically equivalent to :
        !            55:  *  - mach_port_deallocate(task, thread_name);
        !            56:  *  - if (reply_port != MACH_PORT_NULL)
        !            57:  *      mach_port_destroy(task, reply_port);
        !            58:  *  - if ((address != 0) || (size != 0))
        !            59:  *      vm_deallocate(task, address, size)
        !            60:  *  - thread_terminate(thread)
        !            61:  *
        !            62:  * Implemented as a simple routine so a reply port isn't required.
        !            63:  */
        !            64: simpleroutine thread_terminate_release(
        !            65:                thread          : thread_t;
        !            66:                task            : task_t;
        !            67:                thread_name     : mach_port_name_t;
        !            68:                reply_port      : mach_port_name_t;
        !            69:                address         : vm_address_t;
        !            70:                size            : vm_size_t);
        !            71: 
        !            72: /*
        !            73:  *     Set the name of task TASK to NAME.  This is a debugging aid.
        !            74:  *     NAME will be used in error messages printed by the kernel.
        !            75:  */
        !            76: simpleroutine task_set_name(
        !            77:                task    : task_t;
        !            78:                name    : kernel_debug_name_t);
        !            79: 
        !            80: /*
        !            81:  * Register a port to which a notification about newly created tasks
        !            82:  * are sent.
        !            83:  */
        !            84: routine register_new_task_notification(
        !            85:                host_priv       : host_priv_t;
        !            86:                notification    : mach_port_send_t);

unix.superglobalmegacorp.com

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