aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authorcitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-15 07:51:22 +0000
committercitats <citats@f38db490-d61c-443f-a65b-d21fe96a405b>2004-03-15 07:51:22 +0000
commit1c4a4007af71e31785d40ca0d6a371043dc8e908 (patch)
tree9da7eefab98149c7669e84b70601e9e9d3b91ae5 /asterisk.c
parent318e676ec538397aa307deccf765e4131d113fe1 (diff)
Fix bug 1217. Change pthread_t initializers to AST_PTHREADT_NULL and
AST_PTHREADT_STOP git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2434 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-xasterisk.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/asterisk.c b/asterisk.c
index a267df996..7adb02790 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -34,7 +34,7 @@
#include <signal.h>
#include <sched.h>
#include <asterisk/io.h>
-#include <pthread.h>
+#include <asterisk/lock.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/select.h>
@@ -109,7 +109,7 @@ char ast_config_AST_RUN_DIR[AST_CONFIG_MAX_PATH];
static char *_argv[256];
static int shuttingdown = 0;
static int restartnow = 0;
-static pthread_t consolethread = (pthread_t) -1;
+static pthread_t consolethread = AST_PTHREADT_NULL;
int ast_register_atexit(void (*func)(void))
{
@@ -544,7 +544,7 @@ static void quit_handler(int num, int nice, int safeshutdown, int restart)
restartnow = 1;
/* If there is a consolethread running send it a SIGHUP
so it can execvp, otherwise we can do it ourselves */
- if (consolethread != (pthread_t) -1) {
+ if (consolethread != AST_PTHREADT_NULL) {
pthread_kill(consolethread, SIGHUP);
/* Give the signal handler some time to complete */
sleep(2);
@@ -591,7 +591,7 @@ static void console_verboser(const char *s, int pos, int replace, int complete)
fflush(stdout);
if (complete)
/* Wake up a select()ing console */
- if (option_console && consolethread != (pthread_t) -1)
+ if (option_console && consolethread != AST_PTHREADT_NULL)
pthread_kill(consolethread, SIGURG);
}