diff options
Diffstat (limited to 'include/apilib')
-rw-r--r-- | include/apilib/octapi_bt0.h | 65 | ||||
-rw-r--r-- | include/apilib/octapi_largmath.h | 63 | ||||
-rw-r--r-- | include/apilib/octapi_llman.h | 195 |
3 files changed, 175 insertions, 148 deletions
diff --git a/include/apilib/octapi_bt0.h b/include/apilib/octapi_bt0.h index a7dd534..72783b6 100644 --- a/include/apilib/octapi_bt0.h +++ b/include/apilib/octapi_bt0.h @@ -1,30 +1,39 @@ /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\ -File: octapi_bt0.h +File: octapi_bt0.h -Copyright (c) 2001 Octasic Inc. All rights reserved. + Copyright (c) 2001-2006 Octasic Inc. Description: -This source code is Octasic Confidential. Use of and access to this code -is covered by the Octasic Device Enabling Software License Agreement. -Acknowledgement of the Octasic Device Enabling Software License was -required for access to this code. A copy was also provided with the release. + Library used to manage a binary tree of variable max size. Library is + made to use one block of contiguous memory to manage the tree. +This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is +free software; you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation; +either version 2 of the License, or (at your option) any later version. -$Octasic_Release: OCT610xAPI-01.00-PR37 $ +The OCT6100 GPL API is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. -$Octasic_Revision: 10 $ +You should have received a copy of the GNU General Public License +along with the OCT6100 GPL API; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + +$Octasic_Release: OCT612xAPI-01.00-PR43 $ + +$Octasic_Revision: 11 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ #ifndef __OCTAPI_BT0_H__ #define __OCTAPI_BT0_H__ - #include "octdef.h" - -#define OCTAPI_BT0_BASE 0xFFFF0000 +#define OCTAPI_BT0_BASE 0xFFFF0000 #define OCTAPI_BT0_KEY_SIZE_NOT_MUTLIPLE_OF_UINT32 OCTAPI_BT0_BASE+0x0001 #define OCTAPI_BT0_DATA_SIZE_NOT_MUTLIPLE_OF_UINT32 OCTAPI_BT0_BASE+0x0002 #define OCTAPI_BT0_MALLOC_FAILED OCTAPI_BT0_BASE+0x0003 @@ -32,39 +41,35 @@ $Octasic_Revision: 10 $ #define OCTAPI_BT0_KEY_ALREADY_IN_TREE OCTAPI_BT0_BASE+0x0005 #define OCTAPI_BT0_KEY_NOT_IN_TREE OCTAPI_BT0_BASE+0x0006 -/* Possible result for Find Or Add function.*/ -#define OCTAPI0_BT0_NODE_FOUND 0 -#define OCTAPI0_BT0_NODE_ADDDED 1 +/* Possible result for Find Or Add function. */ +#define OCTAPI0_BT0_NODE_FOUND 0 +#define OCTAPI0_BT0_NODE_ADDDED 1 #define OCTAPI_BT0_NO_SMALLER_KEY 0xAAAAAAAA - #ifdef __cplusplus extern "C" { -#endif /* __cplusplus*/ +#endif /* __cplusplus */ #define octapi_bt0_get_size( number_of_items, key_size, data_size, b_size ) OctApiBt0GetSize( (UINT32) number_of_items,(UINT32) key_size, (UINT32) data_size, (PUINT32) b_size ) -#define octapi_bt0_init(b, number_of_items, key_size, data_size) OctApiBt0Init( (void **) b,(UINT32) number_of_items,(UINT32) key_size, (UINT32) data_size ) +#define octapi_bt0_init( b, number_of_items, key_size, data_size ) OctApiBt0Init( (void **) b,(UINT32) number_of_items,(UINT32) key_size, (UINT32) data_size ) #define octapi_bt0_add_node( b, key, data ) OctApiBt0AddNode( (void *) b,(void *) key,(void **) data ) #define octapi_bt0_remove_node( b, key ) OctApiBt0RemoveNode( (void *) b,(void *) key ) #define octapi_bt0_query_node( b, key, data ) OctApiBt0QueryNode( (void *) b,(void *) key,(void **) data ) -#define octapi_bt0_get_first_node( b,key, data ) OctApiBt0GetFirstNode( (void *) b,(void **) key, (void **) data ) - +#define octapi_bt0_get_first_node( b, key, data ) OctApiBt0GetFirstNode( (void *) b,(void **) key, (void **) data ) -static UINT32 OctApiBt0GetSize( UINT32 number_of_items,UINT32 key_size, UINT32 data_size, UINT32 * b_size ); -static UINT32 OctApiBt0Init( void ** b,UINT32 number_of_items,UINT32 key_size, UINT32 data_size ); -UINT32 OctApiBt0AddNode( void * b,void * key,void ** data ); -UINT32 OctApiBt0RemoveNode( void * b,void * key ); -UINT32 OctApiBt0QueryNode( void * b,void * key,void ** data ); -UINT32 OctApiBt0GetFirstNode( void * b,void ** key, void ** data ); -UINT32 OctApiBt0FindOrAddNode(void * b,void * key,void ** data, UINT32 *fnct_result); +static UINT32 OctApiBt0GetSize( UINT32 number_of_items, UINT32 key_size, UINT32 data_size, UINT32 * b_size ); +static UINT32 OctApiBt0Init( void ** b, UINT32 number_of_items, UINT32 key_size, UINT32 data_size ); +UINT32 OctApiBt0AddNode( void * b, void * key, void ** data ); +UINT32 OctApiBt0RemoveNode( void * b, void * key ); +UINT32 OctApiBt0QueryNode( void * b, void * key, void ** data ); +UINT32 OctApiBt0GetFirstNode( void * b, void ** key, void ** data ); +UINT32 OctApiBt0FindOrAddNode( void * b, void * key, void ** data, UINT32 *fnct_result ); -UINT32 OctApiBt0AddNodeReportPrevNodeData(void * b,void * key,void ** data, void ** prev_data, UINT32 *fnct_result ); +UINT32 OctApiBt0AddNodeReportPrevNodeData( void * b, void * key, void ** data, void ** prev_data, UINT32 *fnct_result ); #ifdef __cplusplus } -#endif /* __cplusplus*/ - - +#endif /* __cplusplus */ #endif /*__OCTAPI_BT0_H__*/ diff --git a/include/apilib/octapi_largmath.h b/include/apilib/octapi_largmath.h index dae120a..0f645df 100644 --- a/include/apilib/octapi_largmath.h +++ b/include/apilib/octapi_largmath.h @@ -1,49 +1,56 @@ /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\ -File: octapi_largmath.h +File: octapi_largmath.h -Copyright (c) 2001 Octasic Inc. All rights reserved. + Copyright (c) 2001-2006 Octasic Inc. Description: -This source code is Octasic Confidential. Use of and access to this code -is covered by the Octasic Device Enabling Software License Agreement. -Acknowledgement of the Octasic Device Enabling Software License was -required for access to this code. A copy was also provided with the release. + Library used to perform arithmetic on integer values of an integer multiple + of 32-bits. +This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is +free software; you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation; +either version 2 of the License, or (at your option) any later version. -$Octasic_Release: OCT610xAPI-01.00-PR37 $ +The OCT6100 GPL API is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. -$Octasic_Revision: 5 $ +You should have received a copy of the GNU General Public License +along with the OCT6100 GPL API; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + +$Octasic_Release: OCT612xAPI-01.00-PR43 $ + +$Octasic_Revision: 6 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ #ifndef __OCTAPI_LARGMATH_H__ #define __OCTAPI_LARGMATH_H__ - - #include "octdef.h" +#define OCTAPI_LM_DIVISION_BY_ZERO 0xFFFF +#define OCTAPI_LM_OVERFLOW 0xFFFE +#define OCTAPI_LM_ARRAY_SIZE_MISMATCH 0xFFFD - -#define OCTAPI_LM_DIVISION_BY_ZERO 0xFFFF -#define OCTAPI_LM_OVERFLOW 0xFFFE -#define OCTAPI_LM_ARRAY_SIZE_MISMATCH 0xFFFD - -#define OCTAPI_LM_MAX_OPTIMIZE_MUL 10 +#define OCTAPI_LM_MAX_OPTIMIZE_MUL 10 #ifdef __cplusplus extern "C" { -#endif /* __cplusplus*/ - -#define octapi_lm_add( a, alen, b, blen, z, zlen) OctApiLmAdd( (PUINT32) a, (USHORT) alen, (PUINT32) b, (USHORT) blen, (PUINT32) z, (USHORT) zlen ) -#define octapi_lm_subtract( a, alen, bneg, blen, z, zlen, neg) OctApiLmSubtract( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (PUINT32) z, (USHORT) zlen, (USHORT*) neg ) -#define octapi_lm_compare( a, alen, bneg, blen, neg) OctApiLmCompare( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (USHORT*) neg ) -#define octapi_lm_multiply( a, b, ablen, z) OctApiLmMultiply( (PUINT32) a, (PUINT32) b, (USHORT) ablen, (PUINT32) z ) -#define octapi_lm_divide( n, d, q, r, ndqrlen) OctApiLmDivide( (PUINT32) n, (PUINT32) d, (PUINT32) q, (PUINT32) r, (USHORT) ndqrlen ) -#define octapi_lm_shiftright1( a, alen) OctApiLmShiftRight1( (PUINT32) a, (USHORT) alen ) -#define octapi_lm_shiftn( a, alen, shiftleft, shiftn) OctApiLmShiftn( (PUINT32) a, (USHORT) alen, (USHORT) shiftleft, (USHORT) shiftn ) -#define octapi_lm_getmsb( a, alen, msb_pos) OctApiLmGetMsb( (PUINT32) a, (USHORT) alen, (USHORT*) msb_pos ) +#endif /* __cplusplus */ + +#define octapi_lm_add( a, alen, b, blen, z, zlen ) OctApiLmAdd( (PUINT32) a, (USHORT) alen, (PUINT32) b, (USHORT) blen, (PUINT32) z, (USHORT) zlen ) +#define octapi_lm_subtract( a, alen, bneg, blen, z, zlen, neg ) OctApiLmSubtract( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (PUINT32) z, (USHORT) zlen, (USHORT*) neg ) +#define octapi_lm_compare( a, alen, bneg, blen, neg ) OctApiLmCompare( (PUINT32) a, (USHORT) alen, (PUINT32) bneg, (USHORT) blen, (USHORT*) neg ) +#define octapi_lm_multiply( a, b, ablen, z ) OctApiLmMultiply( (PUINT32) a, (PUINT32) b, (USHORT) ablen, (PUINT32) z ) +#define octapi_lm_divide( n, d, q, r, ndqrlen ) OctApiLmDivide( (PUINT32) n, (PUINT32) d, (PUINT32) q, (PUINT32) r, (USHORT) ndqrlen ) +#define octapi_lm_shiftright1( a, alen ) OctApiLmShiftRight1( (PUINT32) a, (USHORT) alen ) +#define octapi_lm_shiftn( a, alen, shiftleft, shiftn ) OctApiLmShiftn( (PUINT32) a, (USHORT) alen, (USHORT) shiftleft, (USHORT) shiftn ) +#define octapi_lm_getmsb( a, alen, msb_pos ) OctApiLmGetMsb( (PUINT32) a, (USHORT) alen, (USHORT*) msb_pos ) static UINT32 OctApiLmAdd( PUINT32 a, USHORT alen, PUINT32 b, USHORT blen, PUINT32 z, USHORT zlen ); @@ -57,6 +64,6 @@ UINT32 OctApiLmGetMsb( PUINT32 a, USHORT alen, PUSHORT msb_pos ); #ifdef __cplusplus } -#endif /* __cplusplus*/ +#endif /* __cplusplus */ -#endif /*__OCTAPI_LARGMATH_H__*/ +#endif /* __OCTAPI_LARGMATH_H__ */ diff --git a/include/apilib/octapi_llman.h b/include/apilib/octapi_llman.h index 467ed9c..178019e 100644 --- a/include/apilib/octapi_llman.h +++ b/include/apilib/octapi_llman.h @@ -1,127 +1,142 @@ /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\ -File: octapi_llman.h +File: octapi_llman.h -Copyright (c) 2001 Octasic Inc. All rights reserved. + Copyright (c) 2001-2006 Octasic Inc. -Description: +Description: -This source code is Octasic Confidential. Use of and access to this code -is covered by the Octasic Device Enabling Software License Agreement. -Acknowledgement of the Octasic Device Enabling Software License was -required for access to this code. A copy was also provided with the release. + Library used to manage allocation tables and linked lists. The library is + made such that only a block of contiguous memory is needed for the + management of the linked list/allocation table. +This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is +free software; you can redistribute it and/or modify it under the terms of +the GNU General Public License as published by the Free Software Foundation; +either version 2 of the License, or (at your option) any later version. -$Octasic_Release: OCT610xAPI-01.00-PR37 $ +The OCT6100 GPL API is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. -$Octasic_Revision: 7 $ +You should have received a copy of the GNU General Public License +along with the OCT6100 GPL API; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + +$Octasic_Release: OCT612xAPI-01.00-PR43 $ + +$Octasic_Revision: 8 $ \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ +#ifndef __OCTAPI_LLMAN_H__ +#define __OCTAPI_LLMAN_H__ + #include "octdef.h" -/* Error defines*/ -#define OCTAPI_LLM_MEMORY_NOT_ALLOCATED 0xFFFFFFFF -#define OCTAPI_LLM_NO_STRUCTURES_LEFT 0xFFFFFFFE -#define OCTAPI_LLM_BLOCKNUM_OUT_OF_RANGE 0xFFFFFFFD -#define OCTAPI_LLM_ELEMENT_ALREADY_ASSIGNED 0xFFFFFFFC -#define OCTAPI_LLM_ELEMENT_NOT_FOUND 0xFFFFFFFB -#define OCTAPI_LLM_LIST_EMPTY 0xFFFFFFFA -#define OCTAPI_LLM_INVALID_LIST_HANDLE 0xFFFFFFF9 -#define OCTAPI_LLM_TREE_NODE_ABSENT 0xFFFFFFF8 -#define OCTAPI_LLM_INTERNAL_ERROR0 0xFFFFFFF7 -#define OCTAPI_LLM_INTERNAL_ERROR1 0xFFFFFFF6 -#define OCTAPI_LLM_INVALID_PARAMETER 0xFFFFFFF5 - -#define OCTAPI_LLM2_MEMORY_NOT_ALLOCATED 0xFEFFFFFF -#define OCTAPI_LLM2_NO_STRUCTURES_LEFT 0xFEFFFFFE -#define OCTAPI_LLM2_BLOCKNUM_OUT_OF_RANGE 0xFEFFFFFD -#define OCTAPI_LLM2_ELEMENT_ALREADY_ASSIGNED 0xFEFFFFFC -#define OCTAPI_LLM2_ELEMENT_NOT_FOUND 0xFEFFFFFB -#define OCTAPI_LLM2_LIST_EMPTY 0xFEFFFFFA -#define OCTAPI_LLM2_INVALID_LIST_HANDLE 0xFEFFFFF9 -#define OCTAPI_LLM2_TREE_NODE_ABSENT 0xFEFFFFF8 -#define OCTAPI_LLM2_INTERNAL_ERROR0 0xFEFFFFF7 -#define OCTAPI_LLM2_INTERNAL_ERROR1 0xFEFFFFF6 -#define OCTAPI_LLM2_INVALID_PARAMETER 0xFEFFFFF5 - -/* Other defines*/ -#define OCTAPI_LLM_LIST_APPEND 0xFFFFFFFF -#define OCTAPI_LLM2_INSERT_ERROR 0xFFFFFFFF -#define OCTAPI_LLM2_INSERT_FIRST_NODE 0xFFFF0000 -#define OCTAPI_LLM2_INSERT_LIST_NODE 0xFFFF0001 -#define OCTAPI_LLM2_INSERT_LAST_NODE 0xFFFF0002 -#define OCTAPI_LLM2_INSERT_BEFORE_LAST_NODE 0xFFFF0003 -#define OCTAPI_LLM2_REMOVE_ERROR 0xFFFFFFFF -#define OCTAPI_LLM2_REMOVE_FIRST_NODE 0xFFFF0004 -#define OCTAPI_LLM2_REMOVE_LIST_NODE 0xFFFF0005 -#define OCTAPI_LLM2_REMOVE_LAST_NODE 0xFFFF0006 -#define OCTAPI_LLM2_REMOVE_BEFORE_LAST_NODE 0xFFFF0007 +/* Error defines. */ +#define OCTAPI_LLM_MEMORY_NOT_ALLOCATED 0xFFFFFFFF +#define OCTAPI_LLM_NO_STRUCTURES_LEFT 0xFFFFFFFE +#define OCTAPI_LLM_BLOCKNUM_OUT_OF_RANGE 0xFFFFFFFD +#define OCTAPI_LLM_ELEMENT_ALREADY_ASSIGNED 0xFFFFFFFC +#define OCTAPI_LLM_ELEMENT_NOT_FOUND 0xFFFFFFFB +#define OCTAPI_LLM_LIST_EMPTY 0xFFFFFFFA +#define OCTAPI_LLM_INVALID_LIST_HANDLE 0xFFFFFFF9 +#define OCTAPI_LLM_TREE_NODE_ABSENT 0xFFFFFFF8 +#define OCTAPI_LLM_INTERNAL_ERROR0 0xFFFFFFF7 +#define OCTAPI_LLM_INTERNAL_ERROR1 0xFFFFFFF6 +#define OCTAPI_LLM_INVALID_PARAMETER 0xFFFFFFF5 + +#define OCTAPI_LLM2_MEMORY_NOT_ALLOCATED 0xFEFFFFFF +#define OCTAPI_LLM2_NO_STRUCTURES_LEFT 0xFEFFFFFE +#define OCTAPI_LLM2_BLOCKNUM_OUT_OF_RANGE 0xFEFFFFFD +#define OCTAPI_LLM2_ELEMENT_ALREADY_ASSIGNED 0xFEFFFFFC +#define OCTAPI_LLM2_ELEMENT_NOT_FOUND 0xFEFFFFFB +#define OCTAPI_LLM2_LIST_EMPTY 0xFEFFFFFA +#define OCTAPI_LLM2_INVALID_LIST_HANDLE 0xFEFFFFF9 +#define OCTAPI_LLM2_TREE_NODE_ABSENT 0xFEFFFFF8 +#define OCTAPI_LLM2_INTERNAL_ERROR0 0xFEFFFFF7 +#define OCTAPI_LLM2_INTERNAL_ERROR1 0xFEFFFFF6 +#define OCTAPI_LLM2_INVALID_PARAMETER 0xFEFFFFF5 + +/* Other defines. */ +#define OCTAPI_LLM_LIST_APPEND 0xFFFFFFFF +#define OCTAPI_LLM2_INSERT_ERROR 0xFFFFFFFF +#define OCTAPI_LLM2_INSERT_FIRST_NODE 0xFFFF0000 +#define OCTAPI_LLM2_INSERT_LIST_NODE 0xFFFF0001 +#define OCTAPI_LLM2_INSERT_LAST_NODE 0xFFFF0002 +#define OCTAPI_LLM2_INSERT_BEFORE_LAST_NODE 0xFFFF0003 +#define OCTAPI_LLM2_REMOVE_ERROR 0xFFFFFFFF +#define OCTAPI_LLM2_REMOVE_FIRST_NODE 0xFFFF0004 +#define OCTAPI_LLM2_REMOVE_LIST_NODE 0xFFFF0005 +#define OCTAPI_LLM2_REMOVE_LAST_NODE 0xFFFF0006 +#define OCTAPI_LLM2_REMOVE_BEFORE_LAST_NODE 0xFFFF0007 #ifdef __cplusplus extern "C" { -#endif /* __cplusplus*/ - -#define octapi_llm_alloc_get_size( number_of_items, l_size) OctapiLlmAllocGetSize( (UINT32) number_of_items,(PUINT32) l_size ) -#define octapi_llm_alloc_init( l, number_of_items) OctapiLlmAllocInit( (PVOID*) l,(UINT32) number_of_items) -#define octapi_llm_alloc_info( l, allocated_items, available_items) OctapiLlmAllocInfo( (PVOID) l, (PUINT32) allocated_items, (PUINT32) available_items ) -#define octapi_llm_alloc_alloc( l, blocknum) OctapiLlmAllocAlloc( (PVOID) l, (PUINT32) blocknum ) -#define octapi_llm_alloc_dealloc( l, blocknum) OctapiLlmAllocDealloc( (PVOID) l,(UINT32) blocknum ) -#define octapi_llm_list_get_size( number_of_items, number_of_lists, user_info_size, l_size) OctApiLlmListGetSize( (UINT32) number_of_items,(UINT32) number_of_lists,(UINT32) user_info_size,(PUINT32) l_size ) -#define octapi_llm_list_init( l, number_of_items, number_of_lists, user_info_size) OctApiLlmListInit( (PVOID*) l,(UINT32) number_of_items,(UINT32) number_of_lists,(UINT32) user_info_size ) +#endif /* __cplusplus */ + +#define octapi_llm_alloc_get_size( number_of_items, l_size ) OctapiLlmAllocGetSize( (UINT32) number_of_items,(PUINT32) l_size ) +#define octapi_llm_alloc_init( l, number_of_items ) OctapiLlmAllocInit( (PVOID*) l,(UINT32) number_of_items ) +#define octapi_llm_alloc_info( l, allocated_items, available_items ) OctapiLlmAllocInfo( (PVOID) l, (PUINT32) allocated_items, (PUINT32) available_items ) +#define octapi_llm_alloc_alloc( l, blocknum ) OctapiLlmAllocAlloc( (PVOID) l, (PUINT32) blocknum ) +#define octapi_llm_alloc_dealloc( l, blocknum ) OctapiLlmAllocDealloc( (PVOID) l,(UINT32) blocknum ) +#define octapi_llm_list_get_size( number_of_items, number_of_lists, user_info_size, l_size ) OctApiLlmListGetSize( (UINT32) number_of_items,(UINT32) number_of_lists,(UINT32) user_info_size,(PUINT32) l_size ) +#define octapi_llm_list_init( l, number_of_items, number_of_lists, user_info_size ) OctApiLlmListInit( (PVOID*) l,(UINT32) number_of_items,(UINT32) number_of_lists,(UINT32) user_info_size ) #define octapi_llm_list_info( l, allocated_lists, allocated_items, free_lists, free_items ) OctApiLlmListInfo( (PVOID) l,(PUINT32) allocated_lists,(PUINT32) allocated_items,(PUINT32) free_lists,(PUINT32) free_items ) -#define octapi_llm_list_create( l, list_handle) OctApiLlmListCreate( (PVOID) l,(PUINT32) list_handle ) -#define octapi_llm_list_create_full( l, list_length, plist_handle) OctApiLlmListCreateFull( (PVOID) l, (UINT32) list_length, (PUINT32) plist_handle ) -#define octapi_llm_list_append_items( l, list_handle, num_items) OctApiLlmListAppendItems( (PVOID) l, (UINT32) list_handle, (UINT32) num_items ) -#define octapi_llm_list_append_and_set_items( l, list_handle, num_items, data_list) OctApiLlmListAppendAndSetItems( (PVOID) l, (UINT32) list_handle, (UINT32) num_items, (PVOID) data_list ) +#define octapi_llm_list_create( l, list_handle ) OctApiLlmListCreate( (PVOID) l,(PUINT32) list_handle ) +#define octapi_llm_list_create_full( l, list_length, plist_handle ) OctApiLlmListCreateFull( (PVOID) l, (UINT32) list_length, (PUINT32) plist_handle ) +#define octapi_llm_list_append_items( l, list_handle, num_items ) OctApiLlmListAppendItems( (PVOID) l, (UINT32) list_handle, (UINT32) num_items ) +#define octapi_llm_list_append_and_set_items( l, list_handle, num_items, data_list ) OctApiLlmListAppendAndSetItems( (PVOID) l, (UINT32) list_handle, (UINT32) num_items, (PVOID) data_list ) #define octapi_llm_list_delete( l, list_handle ) OctApiLlmListDelete( (PVOID) l,(UINT32) list_handle ) -#define octapi_llm_list_length( l, list_handle, number_of_items_in_list) OctApiLlmListLength( (PVOID) l,(UINT32) list_handle, (PUINT32) number_of_items_in_list ) -#define octapi_llm_list_insert_item( l, list_handle, item_number, item_data_pnt) OctApiLlmListInsertItem( (PVOID) l,(UINT32) list_handle,(UINT32) item_number,(PVOID*) item_data_pnt ) -#define octapi_llm_list_remove_item( l, list_handle, item_number) OctApiLlmListRemoveItem( (PVOID) l,(UINT32) list_handle,(UINT32) item_number ) -#define octapi_llm_list_item_data( l, list_handle, item_number, item_data_pnt) OctApiLlmListItemData( (PVOID) l,(UINT32) list_handle,(UINT32) item_number,(PVOID*) item_data_pnt ) -#define octapi_llm_list_copy_data( l, list_handle, start_item, data_length, pdata_list) OctApiLlmListCopyData( (PVOID) l, (UINT32) list_handle, (UINT32) start_item, (UINT32) data_length, (PVOID) pdata_list ) -#define octapi_llm_list_set_items( l, list_handle, start_item, data_length, pdata_list) OctApiLlmListSetItems( (PVOID) l, (UINT32) list_handle, (UINT32) start_item, (UINT32) data_length, (PVOID) pdata_list ) - - -/* Alloc man.*/ +#define octapi_llm_list_length( l, list_handle, number_of_items_in_list ) OctApiLlmListLength( (PVOID) l,(UINT32) list_handle, (PUINT32) number_of_items_in_list ) +#define octapi_llm_list_insert_item( l, list_handle, item_number, item_data_pnt ) OctApiLlmListInsertItem( (PVOID) l,(UINT32) list_handle,(UINT32) item_number,(PVOID*) item_data_pnt ) +#define octapi_llm_list_remove_item( l, list_handle, item_number ) OctApiLlmListRemoveItem( (PVOID) l,(UINT32) list_handle,(UINT32) item_number ) +#define octapi_llm_list_item_data( l, list_handle, item_number, item_data_pnt ) OctApiLlmListItemData( (PVOID) l,(UINT32) list_handle,(UINT32) item_number,(PVOID*) item_data_pnt ) +#define octapi_llm_list_copy_data( l, list_handle, start_item, data_length, pdata_list ) OctApiLlmListCopyData( (PVOID) l, (UINT32) list_handle, (UINT32) start_item, (UINT32) data_length, (PVOID) pdata_list ) +#define octapi_llm_list_set_items( l, list_handle, start_item, data_length, pdata_list ) OctApiLlmListSetItems( (PVOID) l, (UINT32) list_handle, (UINT32) start_item, (UINT32) data_length, (PVOID) pdata_list ) + +/* Alloc man. */ static UINT32 OctapiLlmAllocGetSize( UINT32 number_of_items,PUINT32 l_size ); -static UINT32 OctapiLlmAllocInit( PVOID* l,UINT32 number_of_items); +static UINT32 OctapiLlmAllocInit( PVOID* l,UINT32 number_of_items ); static UINT32 OctapiLlmAllocInfo( PVOID l, PUINT32 allocated_items, PUINT32 available_items ); static UINT32 OctapiLlmAllocAlloc( PVOID l, PUINT32 blocknum ); static UINT32 OctapiLlmAllocDealloc( PVOID l,UINT32 blocknum ); -/* Time managed alloc man.*/ +/* Time managed alloc man. */ UINT32 OctApiTllmAllocGetSize( UINT32 number_of_items, PUINT32 l_size ); UINT32 OctApiTllmAllocInit( PVOID* l, UINT32 number_of_items ); UINT32 OctApiTllmAllocInfo( PVOID l, PUINT32 allocated_items, PUINT32 available_items ); UINT32 OctApiTllmAllocAlloc( PVOID l, PUINT32 blocknum, UINT32 current_time[2] ); UINT32 OctApiTllmAllocDealloc( PVOID l, UINT32 blocknum, UINT32 timeout_value, UINT32 current_time[2] ); -/* List man.*/ -UINT32 OctApiLlmListGetSize( UINT32 number_of_items,UINT32 number_of_lists,UINT32 user_info_size,PUINT32 l_size ); -UINT32 OctApiLlmListInit( PVOID* l,UINT32 number_of_items,UINT32 number_of_lists,UINT32 user_info_size ); -UINT32 OctApiLlmListInfo( PVOID l,PUINT32 allocated_lists,PUINT32 allocated_items,PUINT32 free_lists,PUINT32 free_items ); -UINT32 OctApiLlmListCreate( PVOID l,PUINT32 list_handle ); +/* List man. */ +UINT32 OctApiLlmListGetSize( UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size, PUINT32 l_size ); +UINT32 OctApiLlmListInit( PVOID* l, UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size ); +UINT32 OctApiLlmListInfo( PVOID l, PUINT32 allocated_lists, PUINT32 allocated_items, PUINT32 free_lists, PUINT32 free_items ); +UINT32 OctApiLlmListCreate( PVOID l, PUINT32 list_handle ); UINT32 OctApiLlmListCreateFull( PVOID l, UINT32 list_length, UINT32* plist_handle ); UINT32 OctApiLlmListAppendItems( PVOID l, UINT32 list_handle, UINT32 num_items ); UINT32 OctApiLlmListAppendAndSetItems( PVOID l, UINT32 list_handle, UINT32 num_items, PVOID data_list ); -UINT32 OctApiLlmListDelete( PVOID l,UINT32 list_handle ); -UINT32 OctApiLlmListLength( PVOID l,UINT32 list_handle, PUINT32 number_of_items_in_list ); -UINT32 OctApiLlmListInsertItem( PVOID l,UINT32 list_handle,UINT32 item_number,PVOID* item_data_pnt ); -UINT32 OctApiLlmListRemoveItem( PVOID l,UINT32 list_handle,UINT32 item_number ); -UINT32 OctApiLlmListItemData( PVOID l,UINT32 list_handle,UINT32 item_number,PVOID* item_data_pnt ); +UINT32 OctApiLlmListDelete( PVOID l, UINT32 list_handle ); +UINT32 OctApiLlmListLength( PVOID l, UINT32 list_handle, PUINT32 number_of_items_in_list ); +UINT32 OctApiLlmListInsertItem( PVOID l, UINT32 list_handle, UINT32 item_number, PVOID* item_data_pnt ); +UINT32 OctApiLlmListRemoveItem( PVOID l, UINT32 list_handle, UINT32 item_number ); +UINT32 OctApiLlmListItemData( PVOID l, UINT32 list_handle, UINT32 item_number, PVOID* item_data_pnt ); UINT32 OctApiLlmListCopyData( PVOID l, UINT32 list_handle, UINT32 start_item, UINT32 data_length, PVOID pdata_list ); UINT32 OctApiLlmListSetItems( PVOID l, UINT32 list_handle, UINT32 start_item, UINT32 data_length, PVOID pdata_list ); -/* Second list manager using a key to order info in the list.*/ -UINT32 OctApiLlm2ListGetSize( UINT32 number_of_items,UINT32 number_of_lists,UINT32 user_info_size,PUINT32 l_size ); -UINT32 OctApiLlm2ListInit( PVOID* l,UINT32 number_of_items,UINT32 number_of_lists,UINT32 user_info_size ); -UINT32 OctApiLlm2ListCreate( PVOID l,PUINT32 list_handle ); -UINT32 OctApiLlm2ListLength( PVOID l,UINT32 list_handle, PUINT32 number_of_items_in_list ); -UINT32 OctApiLlm2ListInsertItem(void * l,UINT32 list_handle,UINT32 item_key,void ** item_data_pnt, void ** prev_item_data_pnt, void ** prev_prev_item_data_pnt, PUINT32 insert_status_pnt ); -UINT32 OctApiLlm2ListRemoveItem(void * l,UINT32 list_handle,UINT32 item_key, PUINT32 prev_item_key_pnt, PUINT32 prev_prev_item_key_pnt, PUINT32 remove_status_pnt ); -UINT32 OctApiLlm2ListItemData( PVOID l,UINT32 list_handle,UINT32 item_key,PVOID* item_data_pnt, PUINT32 item_number ); - +/* Second list manager using a key to order info in the list. */ +UINT32 OctApiLlm2ListGetSize( UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size, PUINT32 l_size ); +UINT32 OctApiLlm2ListInit( PVOID* l,UINT32 number_of_items, UINT32 number_of_lists, UINT32 user_info_size ); +UINT32 OctApiLlm2ListCreate( PVOID l, PUINT32 list_handle ); +UINT32 OctApiLlm2ListLength( PVOID l, UINT32 list_handle, PUINT32 number_of_items_in_list ); +UINT32 OctApiLlm2ListInsertItem(void * l, UINT32 list_handle, UINT32 item_key, void ** item_data_pnt, void ** prev_item_data_pnt, void ** prev_prev_item_data_pnt, PUINT32 insert_status_pnt ); +UINT32 OctApiLlm2ListRemoveItem(void * l, UINT32 list_handle, UINT32 item_key, PUINT32 prev_item_key_pnt, PUINT32 prev_prev_item_key_pnt, PUINT32 remove_status_pnt ); +UINT32 OctApiLlm2ListItemData( PVOID l, UINT32 list_handle, UINT32 item_key, PVOID* item_data_pnt, PUINT32 item_number ); #ifdef __cplusplus } -#endif /* __cplusplus*/ +#endif /* __cplusplus */ + +#endif /* __OCTAPI_LLMAN_H__ */ |