mirror of
https://gitlab.xiph.org/xiph/icecast-common.git
synced 2025-02-02 15:07:47 -05:00
reduce wasted memory on 64bit systems, 32bit has no change
svn path=/icecast/trunk/avl/; revision=14308
This commit is contained in:
parent
4d379b74b1
commit
28fa4f56b5
@ -12,7 +12,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_THREAD
|
#ifndef NO_THREAD
|
||||||
#include <thread/thread.h>
|
#include "thread/thread.h"
|
||||||
#else
|
#else
|
||||||
#define thread_rwlock_create(x) do{}while(0)
|
#define thread_rwlock_create(x) do{}while(0)
|
||||||
#define thread_rwlock_destroy(x) do{}while(0)
|
#define thread_rwlock_destroy(x) do{}while(0)
|
||||||
@ -31,7 +31,7 @@ typedef struct avl_node_tag {
|
|||||||
* factor: 00==-1, 01==0, 10==+1.
|
* factor: 00==-1, 01==0, 10==+1.
|
||||||
* The rest of the bits are used for <rank>
|
* The rest of the bits are used for <rank>
|
||||||
*/
|
*/
|
||||||
unsigned long rank_and_balance;
|
unsigned int rank_and_balance;
|
||||||
#ifndef NO_THREAD
|
#ifndef NO_THREAD
|
||||||
rwlock_t rwlock;
|
rwlock_t rwlock;
|
||||||
#endif
|
#endif
|
||||||
@ -92,8 +92,8 @@ typedef int (*avl_key_printer_fun_type) (char *, void *);
|
|||||||
|
|
||||||
typedef struct _avl_tree {
|
typedef struct _avl_tree {
|
||||||
avl_node * root;
|
avl_node * root;
|
||||||
unsigned long height;
|
unsigned int height;
|
||||||
unsigned long length;
|
unsigned int length;
|
||||||
avl_key_compare_fun_type compare_fun;
|
avl_key_compare_fun_type compare_fun;
|
||||||
void * compare_arg;
|
void * compare_arg;
|
||||||
#ifndef NO_THREAD
|
#ifndef NO_THREAD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user