global.h 471 Bytes
Newer Older
Jack Moffitt's avatar
Jack Moffitt committed
1
2
3
4
5
6
7
8
#ifndef __GLOBAL_H__
#define __GLOBAL_H__

#define ICE_LISTEN_QUEUE 5

#define ICE_RUNNING 1
#define ICE_HALTING 2

9
10
#include "thread/thread.h"

Jack Moffitt's avatar
Jack Moffitt committed
11
12
13
14
15
16
17
18
19
20
typedef struct ice_global_tag
{
	int serversock;

	int running;

	int sources;
	int clients;

	avl_tree *source_tree;
21
22

    cond_t shutdown_cond;
Jack Moffitt's avatar
Jack Moffitt committed
23
24
25
26
27
28
29
30
31
32
} ice_global_t;

extern ice_global_t global;

void global_initialize(void);
void global_shutdown(void);
void global_lock(void);
void global_unlock(void);

#endif  /* __GLOBAL_H__ */