| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#ifndef __OCTAPI_BT0_PRIVATE_H__ |
| 32 |
#define __OCTAPI_BT0_PRIVATE_H__ |
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
#include "octdef.h" |
| 37 |
|
| 38 |
#define OCTAPI_BT0_LKEY_LARGER 0x0 |
| 39 |
#define OCTAPI_BT0_LKEY_SMALLER 0x1 |
| 40 |
#define OCTAPI_BT0_LKEY_EQUAL 0x2 |
| 41 |
|
| 42 |
typedef struct __OCTAPI_BT0_LINK__ |
| 43 |
{ |
| 44 |
UINT32 node_number; |
| 45 |
UINT32 depth; |
| 46 |
} OCTAPI_BT0_LINK; |
| 47 |
|
| 48 |
typedef struct __OCTAPI_BT0_NODE__ |
| 49 |
{ |
| 50 |
UINT32 next_free_node; |
| 51 |
OCTAPI_BT0_LINK l[2]; |
| 52 |
} OCTAPI_BT0_NODE; |
| 53 |
|
| 54 |
|
| 55 |
typedef struct __OCTAPI_BT0__ |
| 56 |
{ |
| 57 |
UINT32 number_of_items; |
| 58 |
UINT32 key_size; |
| 59 |
UINT32 data_size; |
| 60 |
|
| 61 |
|
| 62 |
UINT32 next_free_node; |
| 63 |
|
| 64 |
|
| 65 |
OCTAPI_BT0_NODE * node; |
| 66 |
|
| 67 |
|
| 68 |
OCTAPI_BT0_LINK root_link; |
| 69 |
|
| 70 |
|
| 71 |
UINT32 * key; |
| 72 |
|
| 73 |
|
| 74 |
UINT32 * data; |
| 75 |
|
| 76 |
UINT32 invalid_value; |
| 77 |
UINT32 no_smaller_key; |
| 78 |
|
| 79 |
} OCTAPI_BT0; |
| 80 |
|
| 81 |
void OctApiBt0CorrectPointers( OCTAPI_BT0 * bb ); |
| 82 |
UINT32 OctApiBt0AddNode2( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey, UINT32 new_node_number ); |
| 83 |
UINT32 OctApiBt0AddNode3( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey, UINT32 *p_new_node_number ); |
| 84 |
UINT32 OctApiBt0AddNode4(OCTAPI_BT0 * bb,OCTAPI_BT0_LINK * link,UINT32 * lkey,UINT32 *p_new_node_number, UINT32 *p_prev_node_number, UINT32 state ); |
| 85 |
UINT32 OctApiBt0KeyCompare( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey ); |
| 86 |
void OctApiBt0UpdateLinkDepth( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link ); |
| 87 |
void OctApiBt0Rebalance( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * root_link ); |
| 88 |
void OctApiBt0ExternalHeavy( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * root_link ); |
| 89 |
UINT32 OctApiBt0RemoveNode2( OCTAPI_BT0 * bb, OCTAPI_BT0_LINK * link, UINT32 * lkey, OCTAPI_BT0_LINK * link_to_removed_node, UINT32 state, OCTAPI_BT0_LINK * volatile_grandparent_link ); |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
#endif |