The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/ipc/ipc_splay.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* 
    2  * Mach Operating System
    3  * Copyright (c) 1993,1991,1990,1989 Carnegie Mellon University
    4  * All Rights Reserved.
    5  * 
    6  * Permission to use, copy, modify and distribute this software and its
    7  * documentation is hereby granted, provided that both the copyright
    8  * notice and this permission notice appear in all copies of the
    9  * software, derivative works or modified versions, and any portions
   10  * thereof, and that both notices appear in supporting documentation.
   11  * 
   12  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15  * 
   16  * Carnegie Mellon requests users of this software to return to
   17  * 
   18  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19  *  School of Computer Science
   20  *  Carnegie Mellon University
   21  *  Pittsburgh PA 15213-3890
   22  * 
   23  * any improvements or extensions that they make and grant Carnegie Mellon
   24  * the rights to redistribute these changes.
   25  */
   26 /*
   27  * HISTORY
   28  * $Log:        ipc_splay.h,v $
   29  * Revision 2.6  93/11/17  17:02:30  dbg
   30  *      Added ANSI function prototypes.
   31  *      [93/09/24            dbg]
   32  * 
   33  * Revision 2.5  91/10/09  16:10:55  af
   34  *      Fixed typo in ipc_splay_tree_insert declaration.
   35  *      [91/09/02            rpd]
   36  * 
   37  * Revision 2.4  91/05/14  16:37:18  mrt
   38  *      Correcting copyright
   39  * 
   40  * Revision 2.3  91/02/05  17:24:09  mrt
   41  *      Changed to new Mach copyright
   42  *      [91/02/01  15:51:53  mrt]
   43  * 
   44  * Revision 2.2  90/06/02  14:51:54  rpd
   45  *      Created for new IPC.
   46  *      [90/03/26  21:04:02  rpd]
   47  * 
   48  */
   49 /*
   50  *      File:   ipc/ipc_splay.h
   51  *      Author: Rich Draves
   52  *      Date:   1989
   53  *
   54  *      Declarations of primitive splay tree operations.
   55  */
   56 
   57 #ifndef _IPC_IPC_SPLAY_H_
   58 #define _IPC_IPC_SPLAY_H_
   59 
   60 #include <mach/port.h>
   61 #include <kern/assert.h>
   62 #include <kern/macro_help.h>
   63 #include <ipc/ipc_entry.h>
   64 
   65 typedef struct ipc_splay_tree {
   66         mach_port_t ist_name;           /* name used in last lookup */
   67         ipc_tree_entry_t ist_root;      /* root of middle tree */
   68         ipc_tree_entry_t ist_ltree;     /* root of left tree */
   69         ipc_tree_entry_t *ist_ltreep;   /* pointer into left tree */
   70         ipc_tree_entry_t ist_rtree;     /* root of right tree */
   71         ipc_tree_entry_t *ist_rtreep;   /* pointer into right tree */
   72 } *ipc_splay_tree_t;
   73 
   74 #define ist_lock(splay)         /* no locking */
   75 #define ist_unlock(splay)       /* no locking */
   76 
   77 extern void
   78 ipc_splay_tree_init(ipc_splay_tree_t splay);
   79 
   80 extern boolean_t
   81 ipc_splay_tree_pick(ipc_splay_tree_t splay,
   82                     mach_port_t *namep, ipc_tree_entry_t *entryp);
   83 
   84 extern ipc_tree_entry_t
   85 ipc_splay_tree_lookup(ipc_splay_tree_t splay, mach_port_t name);
   86 
   87 extern void
   88 ipc_splay_tree_insert(ipc_splay_tree_t splay, mach_port_t name,
   89                       ipc_tree_entry_t entry);
   90 
   91 extern void
   92 ipc_splay_tree_delete(ipc_splay_tree_t splay, mach_port_t name,
   93                       ipc_tree_entry_t entry);
   94 
   95 extern void
   96 ipc_splay_tree_split(ipc_splay_tree_t splay, mach_port_t name,
   97                      ipc_splay_tree_t small);
   98 
   99 extern void
  100 ipc_splay_tree_join(ipc_splay_tree_t splay, ipc_splay_tree_t small);
  101 
  102 extern void
  103 ipc_splay_tree_bounds(ipc_splay_tree_t splay, mach_port_t name,
  104                       mach_port_t *lowerp, mach_port_t *upperp);
  105 
  106 extern ipc_tree_entry_t
  107 ipc_splay_traverse_start(ipc_splay_tree_t splay);
  108 
  109 extern ipc_tree_entry_t
  110 ipc_splay_traverse_next(ipc_splay_tree_t splay, boolean_t delete);
  111 
  112 extern void
  113 ipc_splay_traverse_finish(ipc_splay_tree_t splay);
  114 
  115 #endif  /* _IPC_IPC_SPLAY_H_ */

Cache object: 4caf043c3b93b991c32b94820a17e5d6


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.