Index: Makefile =================================================================== RCS file: /cvsroot/iaxclient/app_conference/Makefile,v retrieving revision 1.7 diff -c -r1.7 Makefile *** Makefile 7 Jul 2004 13:39:41 -0000 1.7 --- Makefile 23 Sep 2004 17:19:43 -0000 *************** *** 17,32 **** # app_conference defines which can be passed on the command-line # ! INSTALL_PREFIX := /opt/horizon INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules ! ASTERISK_INCLUDE_DIR := $(HOME)/local/asterisk/asterisk/include # turn app_conference debugging on or off ( 0 == OFF, 1 == ON ) APP_CONFERENCE_DEBUG := 1 # 0 = OFF 1 = astdsp 2 = speex ! SILDET := 2 # # app_conference objects to build --- 17,32 ---- # app_conference defines which can be passed on the command-line # ! INSTALL_PREFIX := /usr INSTALL_MODULES_DIR := $(INSTALL_PREFIX)/lib/asterisk/modules ! ASTERISK_INCLUDE_DIR := /usr/include/asterisk # turn app_conference debugging on or off ( 0 == OFF, 1 == ON ) APP_CONFERENCE_DEBUG := 1 # 0 = OFF 1 = astdsp 2 = speex ! SILDET := 0 # # app_conference objects to build *************** *** 44,50 **** CC = gcc INCLUDE = -I$(ASTERISK_INCLUDE_DIR) ! LIBS = -ldl -lpthread -lm DEBUG := -g CFLAGS = -pipe -std=c99 -Wall -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE --- 44,50 ---- CC = gcc INCLUDE = -I$(ASTERISK_INCLUDE_DIR) ! LIBS = -lpthread -lm DEBUG := -g CFLAGS = -pipe -std=c99 -Wall -Wmissing-prototypes -Wmissing-declarations $(DEBUG) $(INCLUDE) -D_REENTRANT -D_GNU_SOURCE *************** *** 53,64 **** # PERF: below is 10% faster than -O2 or -O3 alone. #CFLAGS += -O3 -ffast-math -funroll-loops # below is another 5% faster or so. ! CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays -fsingle-precision-constant ! CFLAGS += -mcpu=7450 -faltivec -mabi=altivec -mdynamic-no-pic # adding -msse -mfpmath=sse has little effect. #CFLAGS += -O3 -msse -mfpmath=sse #CFLAGS += $(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) ! CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) CFLAGS += -DCRYPTO ifeq ($(APP_CONFERENCE_DEBUG), 1) --- 53,65 ---- # PERF: below is 10% faster than -O2 or -O3 alone. #CFLAGS += -O3 -ffast-math -funroll-loops # below is another 5% faster or so. ! CFLAGS += -O3 -ffast-math -funroll-all-loops -fsingle-precision-constant ! #CFLAGS += -O3 -ffast-math -funroll-all-loops -fprefetch-loop-arrays -fsingle-precision-constant ! #CFLAGS += -mcpu=7450 -faltivec -mabi=altivec -mdynamic-no-pic # adding -msse -mfpmath=sse has little effect. #CFLAGS += -O3 -msse -mfpmath=sse #CFLAGS += $(shell if $(CC) -march=$(PROC) -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo "-march=$(PROC)"; fi) ! #CFLAGS += $(shell if uname -m | grep -q ppc; then echo "-fsigned-char"; fi) CFLAGS += -DCRYPTO ifeq ($(APP_CONFERENCE_DEBUG), 1) *************** *** 102,110 **** install: all for x in $(SHAREDOS); do $(INSTALL) -m 755 $$x $(INSTALL_MODULES_DIR) ; done ! /var/horizon/mojo/lib/horizoncmd restart asterisk # config: all # cp conf.conf /etc/asterisk/ ! --- 103,111 ---- install: all for x in $(SHAREDOS); do $(INSTALL) -m 755 $$x $(INSTALL_MODULES_DIR) ; done ! # /var/horizon/mojo/lib/horizoncmd restart asterisk # config: all # cp conf.conf /etc/asterisk/ ! Index: conference.c =================================================================== RCS file: /cvsroot/iaxclient/app_conference/conference.c,v retrieving revision 1.4 diff -c -r1.4 conference.c *** conference.c 7 Jul 2004 13:39:41 -0000 1.4 --- conference.c 23 Sep 2004 17:19:44 -0000 *************** *** 26,35 **** static struct ast_conference *conflist = NULL ; // mutex for synchronizing access to conflist ! static ast_mutex_t conflist_lock = AST_MUTEX_INITIALIZER ; // mutex for synchronizing calls to start_conference() and remove_conf() ! static ast_mutex_t start_stop_conf_lock = AST_MUTEX_INITIALIZER ; static int conference_count = 0 ; --- 26,35 ---- static struct ast_conference *conflist = NULL ; // mutex for synchronizing access to conflist ! AST_MUTEX_DEFINE_STATIC( conflist_lock ) ; // mutex for synchronizing calls to start_conference() and remove_conf() ! AST_MUTEX_DEFINE_STATIC( start_stop_conf_lock ) ; static int conference_count = 0 ; *************** *** 604,610 **** // acquire conference mutexes ast_mutex_lock( &conf->lock ) ; ! if ( pthread_create( &conf->conference_thread, NULL, (void*)conference_exec, conf ) == 0 ) { // detach the thread so it doesn't leak pthread_detach( conf->conference_thread ) ; --- 604,610 ---- // acquire conference mutexes ast_mutex_lock( &conf->lock ) ; ! if ( ast_pthread_create( &conf->conference_thread, NULL, (void*)conference_exec, conf ) == 0 ) { // detach the thread so it doesn't leak pthread_detach( conf->conference_thread ) ;