Annotation of XNU/iokit/IOKit/system.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: #ifndef __IOKIT_SYSTEM_H
                     23: #define __IOKIT_SYSTEM_H
                     24: 
                     25: #include <sys/cdefs.h>
                     26: 
                     27: __BEGIN_DECLS
                     28: 
                     29: #include <mach/mach_types.h>
                     30: #include <mach/mach_interface.h>
                     31: #include <mach/etap.h>
                     32: #include <mach/etap_events.h>
                     33: 
                     34: #include <stdarg.h>
                     35: 
                     36: #if KERNEL
                     37: #include <IOKit/assert.h>  /* Must be before other includes of kern/assert.h */
                     38: #include <kern/cpu_data.h>
                     39: #include <kern/thread.h>
                     40: #include <kern/thread_act.h>
                     41: #include <vm/pmap.h>
                     42: #include <vm/vm_kern.h>
                     43: #include <kern/kalloc.h>
                     44: #include <kern/task.h>
                     45: #include <kern/thread.h>
                     46: #include <kern/time_out.h>
                     47: #include <kern/sched_prim.h>
                     48: #include <kern/sync_sema.h>
                     49: #include <machine/spl.h>
                     50: #include <kern/lock.h>
                     51: #include <kern/queue.h>
                     52: #include <kern/ipc_mig.h>
                     53: #endif /* KERNEL */
                     54: 
                     55: extern int     bcmp(const void *, const void *, size_t);
                     56: extern void    bcopy(const void *, void *, size_t);
                     57: extern void    bzero(void *, size_t);
                     58: 
                     59: extern void    _doprnt( const char *format, va_list *arg,
                     60:                        void (*putc)(char), int radix );
                     61: 
                     62: extern int     sscanf(const char *input, const char *fmt, ...);
                     63: extern int     sprintf(char *s, const char *format, ...);
                     64: extern long    strtol(const char *, char **, int);
                     65: extern unsigned long strtoul(const char *, char **, int);
                     66: 
                     67: extern
                     68: #ifdef __GNUC__
                     69: volatile
                     70: #endif
                     71: void panic(const char * msg, ...);
                     72: 
                     73: 
                     74: // Exported from osfmk/vm/vm_user.c
                     75: /*
                     76:  *      JMM - Should be able to export this cleanly in the very near
                     77:  *     future.
                     78:  *
                     79:  *     vm_allocate allocates "zero fill" memory in the specfied
                     80:  *     map.
                     81:  */
                     82: extern kern_return_t vm_allocate(vm_map_t      map,
                     83:                                  vm_offset_t   *addr,
                     84:                                  vm_size_t     size,
                     85:                                  boolean_t     anywhere);
                     86: /*
                     87:  *     vm_deallocate deallocates the specified range of addresses in the
                     88:  *     specified address map.
                     89:  */
                     90: extern kern_return_t vm_deallocate(vm_map_t    map,
                     91:                                    vm_offset_t start,
                     92:                                    vm_size_t   size);
                     93: 
                     94: // Grabbed from bsd space
                     95: #define thread_wait_result()   get_thread_waitresult(current_thread())
                     96: 
                     97: 
                     98: 
                     99: /*
                    100:  * Static Complex (read/write) lock operations (should not use
                    101:  * statically allocated locks.  They should all be dynamic.)
                    102:  */
                    103: extern void    lock_init               (void * x,
                    104:                                         boolean_t sleep,
                    105:                                         void * a,
                    106:                                         void * b);
                    107: 
                    108: 
                    109: /*
                    110:  */
                    111: 
                    112: #ifdef __ppc__
                    113: 
                    114: /*
                    115:  * Really need a set of interfaces from osfmk/pexpert components to do
                    116:  * all that is required to prepare an I/O from a cache management point
                    117:  * of view.
                    118:  * osfmk/ppc/cache.s
                    119:  */
                    120: extern void invalidate_icache(vm_offset_t addr, unsigned cnt, int phys);
                    121: extern void flush_dcache(vm_offset_t addr, unsigned count, int phys);
                    122: 
                    123: #endif
                    124: 
                    125: __END_DECLS
                    126: 
                    127: #endif /* !__IOKIT_SYSTEM_H */

unix.superglobalmegacorp.com

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