system: Linux mars.sprixweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
cmd: 

Direktori : /usr/local/src/xcache-3.2.0/util/
Upload File :
Current File : //usr/local/src/xcache-3.2.0/util/xc_stack.h

#ifndef __XC_UTIL_STACK
#define __XC_UTIL_STACK

typedef struct {
	void **data;
	int cnt;
	int size;
} xc_stack_t;

#define S xc_stack_t*
void xc_stack_init_ex(S stack, int initsize);
#define xc_stack_init(stack) xc_stack_init_ex(stack, 8)
void xc_stack_destroy(S stack);
void xc_stack_push(S stack, void *item);
void *xc_stack_pop(S stack);
void *xc_stack_top(S stack);
void *xc_stack_get(S stack, int n);
int xc_stack_count(S stack);
void xc_stack_reverse(S stack);
#undef S

#endif /* __XC_UTIL_STACK */