~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
cvs/emstar/tos-contrib/regionArea/tos/platform/pc/heap.h


  1 // $Id: heap.h,v 1.1 2004-02-25 19:36:36 ben Exp $
  2 
  3 /*                                                                      tab:4
  4  * "Copyright (c) 2000-2003 The Regents of the University  of California.  
  5  * All rights reserved.
  6  *
  7  * Permission to use, copy, modify, and distribute this software and its
  8  * documentation for any purpose, without fee, and without written agreement is
  9  * hereby granted, provided that the above copyright notice, the following
 10  * two paragraphs and the author appear in all copies of this software.
 11  * 
 12  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
 13  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
 14  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
 15  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 16  * 
 17  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 18  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 19  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 20  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
 21  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
 22  *
 23  * Copyright (c) 2002-2003 Intel Corporation
 24  * All rights reserved.
 25  *
 26  * This file is distributed under the terms in the attached INTEL-LICENSE     
 27  * file. If you do not find these files, copies can be found by writing to
 28  * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA, 
 29  * 94704.  Attention:  Intel License Inquiry.
 30  */
 31 /*
 32  *
 33  * Authors:             Philip Levis
 34  *
 35  */
 36 
 37 /*
 38  *   FILE: heap.h
 39  * AUTHOR: pal
 40  *   DESC: Simple tree-based priority heap for discrete event simulation.
 41  *
 42  *  NOTE: NIDO currently does not use this heap structure. It uses an
 43  *  array-based heap for performance reasons.
 44  */
 45 
 46 /**
 47  * @author Philip Levis
 48  * @author pal
 49  */
 50 
 51 
 52 #ifndef HEAP_H_INCLUDED
 53 #define HEAP_H_INCLUDED
 54 
 55 typedef struct {
 56   void* top;
 57   void* last;
 58   void* free;
 59   int size;
 60 } heap_t;
 61 
 62 void init_heap(heap_t* heap);
 63 int heap_size(heap_t* heap);
 64 int heap_is_empty(heap_t* heap);
 65 
 66 long long heap_get_min_key(heap_t* heap);
 67 void* heap_peek_min_data(heap_t* heap);
 68 void* heap_pop_min_data(heap_t* heap, long long* key);
 69 void heap_insert(heap_t * heap, void* data, long long key);
 70 
 71 
 72 #endif // HEAP_H_INCLUDED
 73 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.