Annotation of driverkit/tests/klibtest.m, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
        !             7:  * Reserved.  This file contains Original Code and/or Modifications of
        !             8:  * Original Code as defined in and that are subject to the Apple Public
        !             9:  * Source License Version 1.1 (the "License").  You may not use this file
        !            10:  * except in compliance with the License.  Please obtain a copy of the
        !            11:  * License at http://www.apple.com/publicsource and read it before using
        !            12:  * this file.
        !            13:  * 
        !            14:  * The Original Code and all software distributed under the License are
        !            15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
        !            19:  * License for the specific language governing rights and limitations
        !            20:  * under the License.
        !            21:  * 
        !            22:  * @APPLE_LICENSE_HEADER_END@
        !            23:  */
        !            24: /*
        !            25:  * Test of NXLock, NXConditionLock, and NXSpinLock (kernel version).
        !            26:  */
        !            27: 
        !            28: #define KERNEL_PRIVATE 1               // pick up kernel private files
        !            29: 
        !            30: #import <kernserv/kern_server_types.h>
        !            31: #import <mach/message.h>
        !            32: #import <driverkit/generalFuncs.h>
        !            33: 
        !            34: extern int doNXLockTest(int opcode);
        !            35: 
        !            36: kern_server_t klibtest_ks_var;
        !            37: 
        !            38: /*
        !            39:  * kernserv callout functions.
        !            40:  */
        !            41: void locktest_announce(int unit);
        !            42: void locktest_port_gone(port_name_t port);
        !            43: void locktest_terminate(int unit);
        !            44: void locktest_server(msg_header_t *in_p, int unit);
        !            45: 
        !            46: /* 
        !            47:  * we're just placed into memory here.
        !            48:  */
        !            49: void locktest_announce(int unit) 
        !            50: {
        !            51:        IOLog("klibtest Loaded\n", unit);
        !            52: } 
        !            53: 
        !            54: void locktest_port_gone(port_name_t port) 
        !            55: {
        !            56:        IOLog("klibtest port death\n");
        !            57:        
        !            58: }
        !            59: 
        !            60: void locktest_terminate(int unit) 
        !            61: {
        !            62:        IOLog("klibtest Unloaded\n");
        !            63: }
        !            64: 
        !            65: /*
        !            66:  * This is invoked upon receipt of any message. (Use the smsg utility to
        !            67:  * send an empty message here.)
        !            68:  */
        !            69: void locktest_server(msg_header_t *in_p, int unit)
        !            70: {
        !            71:        int opcode = in_p->msg_id;
        !            72:        
        !            73:        IOLog("klibtest: Starting\n");
        !            74:        doNXLockTest(opcode);
        !            75:        msg_send(in_p, 
        !            76:                MSG_OPTION_NONE,
        !            77:                0);     
        !            78: } /* locktest_server() */
        !            79: 
        !            80: 

unix.superglobalmegacorp.com

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