mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-22 04:15:54 -04:00
913ec3481a
available, but is deprecated and turned off by default. svn path=/trunk/icecast/; revision=3837
42 lines
719 B
C
42 lines
719 B
C
#include "thread.h"
|
|
#include "avl.h"
|
|
|
|
#include "httpp.h"
|
|
#include "connection.h"
|
|
#include "refbuf.h"
|
|
#include "format.h"
|
|
#include "client.h"
|
|
#include "source.h"
|
|
|
|
#include "global.h"
|
|
|
|
ice_global_t global;
|
|
|
|
static mutex_t _global_mutex;
|
|
|
|
void global_initialize(void)
|
|
{
|
|
global.serversock = 0;
|
|
global.running = 0;
|
|
global.clients = 0;
|
|
global.sources = 0;
|
|
global.source_tree = avl_tree_new(source_compare_sources, NULL);
|
|
thread_mutex_create(&_global_mutex);
|
|
}
|
|
|
|
void global_shutdown(void)
|
|
{
|
|
thread_mutex_destroy(&_global_mutex);
|
|
avl_tree_free(global.source_tree, source_free_source);
|
|
}
|
|
|
|
void global_lock(void)
|
|
{
|
|
thread_mutex_lock(&_global_mutex);
|
|
}
|
|
|
|
void global_unlock(void)
|
|
{
|
|
thread_mutex_unlock(&_global_mutex);
|
|
}
|