Annotation of Gnu-Mach/vm/vm_map.h, revision 1.1.1.3

1.1       root        1: /*
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University.
                      4:  * Copyright (c) 1993,1994 The University of Utah and
                      5:  * the Computer Systems Laboratory (CSL).
                      6:  * All rights reserved.
                      7:  *
                      8:  * Permission to use, copy, modify and distribute this software and its
                      9:  * documentation is hereby granted, provided that both the copyright
                     10:  * notice and this permission notice appear in all copies of the
                     11:  * software, derivative works or modified versions, and any portions
                     12:  * thereof, and that both notices appear in supporting documentation.
                     13:  *
                     14:  * CARNEGIE MELLON, THE UNIVERSITY OF UTAH AND CSL ALLOW FREE USE OF
                     15:  * THIS SOFTWARE IN ITS "AS IS" CONDITION, AND DISCLAIM ANY LIABILITY
                     16:  * OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF
                     17:  * THIS SOFTWARE.
                     18:  *
                     19:  * Carnegie Mellon requests users of this software to return to
                     20:  *
                     21:  *  Software Distribution Coordinator  or  [email protected]
                     22:  *  School of Computer Science
                     23:  *  Carnegie Mellon University
                     24:  *  Pittsburgh PA 15213-3890
                     25:  *
                     26:  * any improvements or extensions that they make and grant Carnegie Mellon
                     27:  * the rights to redistribute these changes.
                     28:  */
                     29: /*
                     30:  *     File:   vm/vm_map.h
                     31:  *     Author: Avadis Tevanian, Jr., Michael Wayne Young
                     32:  *     Date:   1985
                     33:  *
                     34:  *     Virtual memory map module definitions.
                     35:  *
                     36:  * Contributors:
                     37:  *     avie, dlb, mwyoung
                     38:  */
                     39: 
                     40: #ifndef        _VM_VM_MAP_H_
                     41: #define _VM_VM_MAP_H_
                     42: 
                     43: #include <mach/kern_return.h>
                     44: #include <mach/boolean.h>
                     45: #include <mach/machine/vm_types.h>
1.1.1.3 ! root       46: #include <mach/vm_attributes.h>
1.1       root       47: #include <mach/vm_prot.h>
                     48: #include <mach/vm_inherit.h>
                     49: #include <vm/pmap.h>
                     50: #include <vm/vm_object.h>
                     51: #include <vm/vm_page.h>
1.1.1.3 ! root       52: #include <vm/vm_types.h>
1.1       root       53: #include <kern/lock.h>
1.1.1.3 ! root       54: #include <kern/rbtree.h>
1.1       root       55: #include <kern/macro_help.h>
                     56: 
1.1.1.3 ! root       57: /* TODO: make it dynamic */
        !            58: #define KENTRY_DATA_SIZE (64*PAGE_SIZE)
        !            59: 
1.1       root       60: /*
                     61:  *     Types defined:
                     62:  *
                     63:  *     vm_map_entry_t          an entry in an address map.
                     64:  *     vm_map_version_t        a timestamp of a map, for use with vm_map_lookup
                     65:  *     vm_map_copy_t           represents memory copied from an address map,
                     66:  *                              used for inter-map copy operations
                     67:  */
                     68: 
                     69: /*
                     70:  *     Type:           vm_map_object_t [internal use only]
                     71:  *
                     72:  *     Description:
                     73:  *             The target of an address mapping, either a virtual
                     74:  *             memory object or a sub map (of the kernel map).
                     75:  */
                     76: typedef union vm_map_object {
                     77:        struct vm_object        *vm_object;     /* object object */
                     78:        struct vm_map           *sub_map;       /* belongs to another map */
                     79: } vm_map_object_t;
                     80: 
                     81: /*
                     82:  *     Type:           vm_map_entry_t [internal use only]
                     83:  *
                     84:  *     Description:
                     85:  *             A single mapping within an address map.
                     86:  *
                     87:  *     Implementation:
                     88:  *             Address map entries consist of start and end addresses,
                     89:  *             a VM object (or sub map) and offset into that object,
                     90:  *             and user-exported inheritance and protection information.
                     91:  *             Control information for virtual copy operations is also
                     92:  *             stored in the address map entry.
                     93:  */
                     94: struct vm_map_links {
                     95:        struct vm_map_entry     *prev;          /* previous entry */
                     96:        struct vm_map_entry     *next;          /* next entry */
                     97:        vm_offset_t             start;          /* start address */
                     98:        vm_offset_t             end;            /* end address */
                     99: };
                    100: 
                    101: struct vm_map_entry {
                    102:        struct vm_map_links     links;          /* links to other entries */
                    103: #define vme_prev               links.prev
                    104: #define vme_next               links.next
                    105: #define vme_start              links.start
                    106: #define vme_end                        links.end
1.1.1.3 ! root      107:        struct rbtree_node      tree_node;      /* links to other entries in tree */
1.1       root      108:        union vm_map_object     object;         /* object I point to */
                    109:        vm_offset_t             offset;         /* offset into object */
                    110:        unsigned int
                    111:        /* boolean_t */         is_shared:1,    /* region is shared */
                    112:        /* boolean_t */         is_sub_map:1,   /* Is "object" a submap? */
                    113:        /* boolean_t */         in_transition:1, /* Entry being changed */
                    114:        /* boolean_t */         needs_wakeup:1,  /* Waiters on in_transition */
                    115:                /* Only used when object is a vm_object: */
                    116:        /* boolean_t */         needs_copy:1;    /* does object need to be copied */
                    117: 
                    118:                /* Only in task maps: */
                    119:        vm_prot_t               protection;     /* protection code */
                    120:        vm_prot_t               max_protection; /* maximum protection */
                    121:        vm_inherit_t            inheritance;    /* inheritance */
                    122:        unsigned short          wired_count;    /* can be paged if = 0 */
                    123:        unsigned short          user_wired_count; /* for vm_wire */
                    124:        struct vm_map_entry     *projected_on;  /* 0 for normal map entry
                    125:            or persistent kernel map projected buffer entry;
                    126:            -1 for non-persistent kernel map projected buffer entry;
                    127:            pointer to corresponding kernel map entry for user map
                    128:            projected buffer entry */
                    129: };
                    130: 
                    131: typedef struct vm_map_entry    *vm_map_entry_t;
                    132: 
                    133: #define VM_MAP_ENTRY_NULL      ((vm_map_entry_t) 0)
                    134: 
                    135: /*
                    136:  *     Type:           struct vm_map_header
                    137:  *
                    138:  *     Description:
                    139:  *             Header for a vm_map and a vm_map_copy.
                    140:  */
                    141: struct vm_map_header {
                    142:        struct vm_map_links     links;          /* first, last, min, max */
1.1.1.3 ! root      143:        struct rbtree           tree;           /* Sorted tree of entries */
1.1       root      144:        int                     nentries;       /* Number of entries */
                    145:        boolean_t               entries_pageable;
                    146:                                                /* are map entries pageable? */
                    147: };
                    148: 
                    149: /*
                    150:  *     Type:           vm_map_t [exported; contents invisible]
                    151:  *
                    152:  *     Description:
                    153:  *             An address map -- a directory relating valid
                    154:  *             regions of a task's address space to the corresponding
                    155:  *             virtual memory objects.
                    156:  *
                    157:  *     Implementation:
                    158:  *             Maps are doubly-linked lists of map entries, sorted
1.1.1.3 ! root      159:  *             by address.  They're also contained in a red-black tree.
        !           160:  *             One hint is used to start searches again at the last
        !           161:  *             successful search, insertion, or removal.  If the hint
        !           162:  *             lookup failed (i.e. the hint didn't refer to the requested
        !           163:  *             entry), a BST lookup is performed.  Another hint is used to
1.1       root      164:  *             quickly find free space.
                    165:  */
                    166: struct vm_map {
                    167:        lock_data_t             lock;           /* Lock for map data */
                    168:        struct vm_map_header    hdr;            /* Map entry header */
                    169: #define min_offset             hdr.links.start /* start of range */
                    170: #define max_offset             hdr.links.end   /* end of range */
                    171:        pmap_t                  pmap;           /* Physical map */
                    172:        vm_size_t               size;           /* virtual size */
                    173:        int                     ref_count;      /* Reference count */
                    174:        decl_simple_lock_data(, ref_lock)       /* Lock for ref_count field */
                    175:        vm_map_entry_t          hint;           /* hint for quick lookups */
                    176:        decl_simple_lock_data(, hint_lock)      /* lock for hint storage */
                    177:        vm_map_entry_t          first_free;     /* First free space hint */
                    178:        boolean_t               wait_for_space; /* Should callers wait
                    179:                                                   for space? */
                    180:        boolean_t               wiring_required;/* All memory wired? */
                    181:        unsigned int            timestamp;      /* Version number */
                    182: };
                    183: 
                    184: #define vm_map_to_entry(map)   ((struct vm_map_entry *) &(map)->hdr.links)
                    185: #define vm_map_first_entry(map)        ((map)->hdr.links.next)
                    186: #define vm_map_last_entry(map) ((map)->hdr.links.prev)
                    187: 
                    188: /*
                    189:  *     Type:           vm_map_version_t [exported; contents invisible]
                    190:  *
                    191:  *     Description:
                    192:  *             Map versions may be used to quickly validate a previous
                    193:  *             lookup operation.
                    194:  *
                    195:  *     Usage note:
                    196:  *             Because they are bulky objects, map versions are usually
                    197:  *             passed by reference.
                    198:  *
                    199:  *     Implementation:
                    200:  *             Just a timestamp for the main map.
                    201:  */
                    202: typedef struct vm_map_version {
                    203:        unsigned int    main_timestamp;
                    204: } vm_map_version_t;
                    205: 
                    206: /*
                    207:  *     Type:           vm_map_copy_t [exported; contents invisible]
                    208:  *
                    209:  *     Description:
                    210:  *             A map copy object represents a region of virtual memory
                    211:  *             that has been copied from an address map but is still
                    212:  *             in transit.
                    213:  *
                    214:  *             A map copy object may only be used by a single thread
                    215:  *             at a time.
                    216:  *
                    217:  *     Implementation:
1.1.1.2   root      218:  *             There are three formats for map copy objects.
1.1       root      219:  *             The first is very similar to the main
                    220:  *             address map in structure, and as a result, some
                    221:  *             of the internal maintenance functions/macros can
                    222:  *             be used with either address maps or map copy objects.
                    223:  *
                    224:  *             The map copy object contains a header links
                    225:  *             entry onto which the other entries that represent
                    226:  *             the region are chained.
                    227:  *
                    228:  *             The second format is a single vm object.  This is used
                    229:  *             primarily in the pageout path.  The third format is a
                    230:  *             list of vm pages.  An optional continuation provides
                    231:  *             a hook to be called to obtain more of the memory,
                    232:  *             or perform other operations.  The continuation takes 3
                    233:  *             arguments, a saved arg buffer, a pointer to a new vm_map_copy
                    234:  *             (returned) and an abort flag (abort if TRUE).
                    235:  */
                    236: 
                    237: #define VM_MAP_COPY_PAGE_LIST_MAX      64
                    238: 
                    239: typedef struct vm_map_copy {
                    240:        int                     type;
                    241: #define VM_MAP_COPY_ENTRY_LIST 1
                    242: #define VM_MAP_COPY_OBJECT     2
                    243: #define VM_MAP_COPY_PAGE_LIST  3
                    244:        vm_offset_t             offset;
                    245:        vm_size_t               size;
                    246:        union {
                    247:            struct vm_map_header        hdr;    /* ENTRY_LIST */
                    248:            struct {                            /* OBJECT */
                    249:                vm_object_t             object;
                    250:            } c_o;
                    251:            struct {                            /* PAGE_LIST */
                    252:                vm_page_t               page_list[VM_MAP_COPY_PAGE_LIST_MAX];
                    253:                int                     npages;
                    254:                kern_return_t           (*cont)();
                    255:                char                    *cont_args;
                    256:            } c_p;
                    257:        } c_u;
                    258: } *vm_map_copy_t;
                    259: 
                    260: #define cpy_hdr                        c_u.hdr
                    261: 
                    262: #define cpy_object             c_u.c_o.object
                    263: 
                    264: #define cpy_page_list          c_u.c_p.page_list
                    265: #define cpy_npages             c_u.c_p.npages
                    266: #define cpy_cont               c_u.c_p.cont
                    267: #define cpy_cont_args          c_u.c_p.cont_args
                    268: 
                    269: #define        VM_MAP_COPY_NULL        ((vm_map_copy_t) 0)
                    270: 
                    271: /*
                    272:  *     Useful macros for entry list copy objects
                    273:  */
                    274: 
                    275: #define vm_map_copy_to_entry(copy)             \
                    276:                ((struct vm_map_entry *) &(copy)->cpy_hdr.links)
                    277: #define vm_map_copy_first_entry(copy)          \
                    278:                ((copy)->cpy_hdr.links.next)
                    279: #define vm_map_copy_last_entry(copy)           \
                    280:                ((copy)->cpy_hdr.links.prev)
                    281: 
                    282: /*
                    283:  *     Continuation macros for page list copy objects
                    284:  */
                    285: 
                    286: #define        vm_map_copy_invoke_cont(old_copy, new_copy, result)             \
                    287: MACRO_BEGIN                                                            \
                    288:        vm_map_copy_page_discard(old_copy);                             \
                    289:        *result = (*((old_copy)->cpy_cont))((old_copy)->cpy_cont_args,  \
                    290:                                            new_copy);                  \
                    291:        (old_copy)->cpy_cont = (kern_return_t (*)()) 0;                 \
                    292: MACRO_END
                    293: 
                    294: #define        vm_map_copy_invoke_extend_cont(old_copy, new_copy, result)      \
                    295: MACRO_BEGIN                                                            \
                    296:        *result = (*((old_copy)->cpy_cont))((old_copy)->cpy_cont_args,  \
                    297:                                            new_copy);                  \
                    298:        (old_copy)->cpy_cont = (kern_return_t (*)()) 0;                 \
                    299: MACRO_END
                    300: 
                    301: #define vm_map_copy_abort_cont(old_copy)                               \
                    302: MACRO_BEGIN                                                            \
                    303:        vm_map_copy_page_discard(old_copy);                             \
                    304:        (*((old_copy)->cpy_cont))((old_copy)->cpy_cont_args,            \
                    305:                                  (vm_map_copy_t *) 0);                 \
                    306:        (old_copy)->cpy_cont = (kern_return_t (*)()) 0;                 \
                    307:        (old_copy)->cpy_cont_args = (char *) 0;                         \
                    308: MACRO_END
                    309: 
                    310: #define vm_map_copy_has_cont(copy)                                     \
                    311:     (((copy)->cpy_cont) != (kern_return_t (*)()) 0)
                    312: 
                    313: /*
                    314:  *     Continuation structures for vm_map_copyin_page_list.
                    315:  */
                    316: 
                    317: typedef        struct {
                    318:        vm_map_t        map;
                    319:        vm_offset_t     src_addr;
                    320:        vm_size_t       src_len;
                    321:        vm_offset_t     destroy_addr;
                    322:        vm_size_t       destroy_len;
                    323:        boolean_t       steal_pages;
                    324: }  vm_map_copyin_args_data_t, *vm_map_copyin_args_t;
                    325: 
                    326: #define        VM_MAP_COPYIN_ARGS_NULL ((vm_map_copyin_args_t) 0)
                    327: 
                    328: /*
                    329:  *     Macros:         vm_map_lock, etc. [internal use only]
                    330:  *     Description:
                    331:  *             Perform locking on the data portion of a map.
                    332:  */
                    333: 
                    334: #define vm_map_lock_init(map)                  \
                    335: MACRO_BEGIN                                    \
                    336:        lock_init(&(map)->lock, TRUE);          \
                    337:        (map)->timestamp = 0;                   \
                    338: MACRO_END
                    339: 
                    340: #define vm_map_lock(map)                       \
                    341: MACRO_BEGIN                                    \
                    342:        lock_write(&(map)->lock);               \
                    343:        (map)->timestamp++;                     \
                    344: MACRO_END
                    345: 
                    346: #define vm_map_unlock(map)     lock_write_done(&(map)->lock)
                    347: #define vm_map_lock_read(map)  lock_read(&(map)->lock)
                    348: #define vm_map_unlock_read(map)        lock_read_done(&(map)->lock)
                    349: #define vm_map_lock_write_to_read(map) \
                    350:                lock_write_to_read(&(map)->lock)
                    351: #define vm_map_lock_read_to_write(map) \
                    352:                (lock_read_to_write(&(map)->lock) || (((map)->timestamp++), 0))
                    353: #define vm_map_lock_set_recursive(map) \
                    354:                lock_set_recursive(&(map)->lock)
                    355: #define vm_map_lock_clear_recursive(map) \
                    356:                lock_clear_recursive(&(map)->lock)
                    357: 
                    358: /*
                    359:  *     Exported procedures that operate on vm_map_t.
                    360:  */
                    361: 
                    362: extern vm_offset_t     kentry_data;
1.1.1.3 ! root      363: extern vm_size_t       kentry_data_size;
1.1       root      364: extern int             kentry_count;
1.1.1.3 ! root      365: /* Initialize the module */
        !           366: extern void            vm_map_init(void);
1.1       root      367: 
1.1.1.3 ! root      368: /* Initialize an empty map */
        !           369: extern void            vm_map_setup(vm_map_t, pmap_t, vm_offset_t, vm_offset_t,
        !           370:                                     boolean_t);
        !           371: /* Create an empty map */
        !           372: extern vm_map_t                vm_map_create(pmap_t, vm_offset_t, vm_offset_t,
        !           373:                                      boolean_t);
        !           374: /* Create a map in the image of an existing map */
        !           375: extern vm_map_t                vm_map_fork(vm_map_t);
        !           376: 
        !           377: /* Gain a reference to an existing map */
        !           378: extern void            vm_map_reference(vm_map_t);
        !           379: /* Lose a reference */
        !           380: extern void            vm_map_deallocate(vm_map_t);
        !           381: 
        !           382: /* Enter a mapping */
        !           383: extern kern_return_t   vm_map_enter(vm_map_t, vm_offset_t *, vm_size_t,
        !           384:                                     vm_offset_t, boolean_t, vm_object_t,
        !           385:                                     vm_offset_t, boolean_t, vm_prot_t,
        !           386:                                     vm_prot_t, vm_inherit_t);
        !           387: /* Enter a mapping primitive */
        !           388: extern kern_return_t   vm_map_find_entry(vm_map_t, vm_offset_t *, vm_size_t,
        !           389:                                          vm_offset_t, vm_object_t,
        !           390:                                          vm_map_entry_t *);
        !           391: /* Deallocate a region */
        !           392: extern kern_return_t   vm_map_remove(vm_map_t, vm_offset_t, vm_offset_t);
        !           393: /* Change protection */
        !           394: extern kern_return_t   vm_map_protect(vm_map_t, vm_offset_t, vm_offset_t,
        !           395:                                       vm_prot_t, boolean_t);
        !           396: /* Change inheritance */
        !           397: extern kern_return_t   vm_map_inherit(vm_map_t, vm_offset_t, vm_offset_t,
        !           398:                                       vm_inherit_t);
        !           399: 
        !           400: /* Look up an address */
        !           401: extern kern_return_t   vm_map_lookup(vm_map_t *, vm_offset_t, vm_prot_t,
        !           402:                                      vm_map_version_t *, vm_object_t *,
        !           403:                                      vm_offset_t *, vm_prot_t *, boolean_t *);
        !           404: /* Find a map entry */
        !           405: extern boolean_t       vm_map_lookup_entry(vm_map_t, vm_offset_t,
        !           406:                                            vm_map_entry_t *);
        !           407: /* Verify that a previous lookup is still valid */
        !           408: extern boolean_t       vm_map_verify(vm_map_t, vm_map_version_t *);
1.1       root      409: /* vm_map_verify_done is now a macro -- see below */
1.1.1.3 ! root      410: /* Make a copy of a region */
        !           411: extern kern_return_t   vm_map_copyin(vm_map_t, vm_offset_t, vm_size_t,
        !           412:                                      boolean_t, vm_map_copy_t *);
        !           413: /* Make a copy of a region using a page list copy */
        !           414: extern kern_return_t   vm_map_copyin_page_list(vm_map_t, vm_offset_t,
        !           415:                                                vm_size_t, boolean_t,
        !           416:                                                boolean_t, vm_map_copy_t *,
        !           417:                                                boolean_t);
        !           418: /* Place a copy into a map */
        !           419: extern kern_return_t   vm_map_copyout(vm_map_t, vm_offset_t *, vm_map_copy_t);
        !           420: /* Overwrite existing memory with a copy */
        !           421: extern kern_return_t   vm_map_copy_overwrite(vm_map_t, vm_offset_t,
        !           422:                                              vm_map_copy_t, boolean_t);
        !           423: /* Discard a copy without using it */
        !           424: extern void            vm_map_copy_discard(vm_map_copy_t);
        !           425: extern void            vm_map_copy_page_discard(vm_map_copy_t);
        !           426: extern vm_map_copy_t   vm_map_copy_copy(vm_map_copy_t);
        !           427: /* Page list continuation version of previous */
        !           428: extern kern_return_t   vm_map_copy_discard_cont(vm_map_copyin_args_t,
        !           429:                                                 vm_map_copy_t *);
        !           430: 
        !           431: /* Add or remove machine- dependent attributes from map regions */
        !           432: extern kern_return_t   vm_map_machine_attribute(vm_map_t, vm_offset_t,
        !           433:                                                 vm_size_t,
        !           434:                                                 vm_machine_attribute_t,
        !           435:                                                 vm_machine_attribute_val_t *);
        !           436: 
        !           437: /* Delete entry from map */
        !           438: extern void            vm_map_entry_delete(vm_map_t, vm_map_entry_t);
1.1       root      439: 
                    440: /*
                    441:  *     Functions implemented as macros
                    442:  */
                    443: #define                vm_map_min(map)         ((map)->min_offset)
                    444:                                                /* Lowest valid address in
                    445:                                                 * a map */
                    446: 
                    447: #define                vm_map_max(map)         ((map)->max_offset)
                    448:                                                /* Highest valid address */
                    449: 
                    450: #define                vm_map_pmap(map)        ((map)->pmap)
                    451:                                                /* Physical map associated
                    452:                                                 * with this address map */
                    453: 
                    454: #define                vm_map_verify_done(map, version)    (vm_map_unlock_read(map))
                    455:                                                /* Operation that required
                    456:                                                 * a verified lookup is
                    457:                                                 * now complete */
                    458: /*
                    459:  *     Pageability functions.  Includes macro to preserve old interface.
                    460:  */
1.1.1.3 ! root      461: extern kern_return_t   vm_map_pageable_common(vm_map_t, vm_offset_t,
        !           462:                                               vm_offset_t, vm_prot_t,
        !           463:                                               boolean_t);
1.1       root      464: 
                    465: #define vm_map_pageable(map, s, e, access)     \
                    466:                vm_map_pageable_common(map, s, e, access, FALSE)
                    467: 
                    468: #define vm_map_pageable_user(map, s, e, access)        \
                    469:                vm_map_pageable_common(map, s, e, access, TRUE)
                    470: 
                    471: /*
                    472:  *     Submap object.  Must be used to create memory to be put
                    473:  *     in a submap by vm_map_submap.
                    474:  */
                    475: extern vm_object_t     vm_submap_object;
                    476: 
                    477: /*
1.1.1.3 ! root      478:  *  vm_map_copyin_object:
        !           479:  *
        !           480:  *  Create a copy object from an object.
        !           481:  *  Our caller donates an object reference.
        !           482:  */
        !           483: extern kern_return_t vm_map_copyin_object(
        !           484:     vm_object_t object,
        !           485:     vm_offset_t offset,     /* offset of region in object */
        !           486:     vm_size_t   size,       /* size of region in object */
        !           487:     vm_map_copy_t   *copy_result);   /* OUT */
        !           488: 
        !           489: /*
        !           490:  *  vm_map_submap:      [ kernel use only ]
        !           491:  *
        !           492:  *  Mark the given range as handled by a subordinate map.
        !           493:  *
        !           494:  *  This range must have been created with vm_map_find using
        !           495:  *  the vm_submap_object, and no other operations may have been
        !           496:  *  performed on this range prior to calling vm_map_submap.
        !           497:  *
        !           498:  *  Only a limited number of operations can be performed
        !           499:  *  within this rage after calling vm_map_submap:
        !           500:  *      vm_fault
        !           501:  *  [Don't try vm_map_copyin!]
        !           502:  *
        !           503:  *  To remove a submapping, one must first remove the
        !           504:  *  range from the superior map, and then destroy the
        !           505:  *  submap (if desired).  [Better yet, don't try it.]
        !           506:  */
        !           507: extern kern_return_t vm_map_submap(
        !           508:     vm_map_t   map,
        !           509:     vm_offset_t    start,
        !           510:     vm_offset_t    end,
        !           511:     vm_map_t        submap);
        !           512: 
        !           513: /*
1.1       root      514:  *     Wait and wakeup macros for in_transition map entries.
                    515:  */
                    516: #define vm_map_entry_wait(map, interruptible)          \
                    517:         MACRO_BEGIN                                     \
                    518:         assert_wait((event_t)&(map)->hdr, interruptible);      \
                    519:         vm_map_unlock(map);                             \
                    520:        thread_block((void (*)()) 0);                   \
                    521:         MACRO_END
                    522: 
                    523: #define vm_map_entry_wakeup(map)        thread_wakeup((event_t)&(map)->hdr)
                    524: 
1.1.1.3 ! root      525: /*
        !           526:  *      This routine is called only when it is known that
        !           527:  *      the entry must be split.
        !           528:  */
        !           529: extern void _vm_map_clip_start(
        !           530:         struct vm_map_header *map_header,
        !           531:         vm_map_entry_t entry,
        !           532:         vm_offset_t start);
        !           533: 
        !           534: /*
        !           535:  *      vm_map_clip_end:        [ internal use only ]
        !           536:  *
        !           537:  *      Asserts that the given entry ends at or before
        !           538:  *      the specified address; if necessary,
        !           539:  *      it splits the entry into two.
        !           540:  */
        !           541: void _vm_map_clip_end();
        !           542: 
1.1.1.2   root      543: #endif /* _VM_VM_MAP_H_ */

unix.superglobalmegacorp.com

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