diff options
author | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2001-04-05 14:41:17 +0000 |
---|---|---|
committer | tradke <tradke@1faa4e14-9dd3-4be0-9f0e-ffe519881164> | 2001-04-05 14:41:17 +0000 |
commit | 04c49872fd97d93e637ddb92d72d06059d145b1d (patch) | |
tree | 7253aada54b7c970c2201db743532589b17e1233 | |
parent | 9440c6b2556d012a91c44eee00c56790819b722f (diff) |
Changed '#ifdef PTHREADS' into '#ifdef CCTK_PTHREADS'.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@121 1faa4e14-9dd3-4be0-9f0e-ffe519881164
-rw-r--r-- | src/Startup.c | 18 | ||||
-rw-r--r-- | src/Steer.c | 12 |
2 files changed, 15 insertions, 15 deletions
diff --git a/src/Startup.c b/src/Startup.c index e288d95..aa579f0 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -10,7 +10,7 @@ #include "cctk.h" -#ifdef PTHREADS +#ifdef CCTK_PTHREADS #include <pthread.h> #endif @@ -36,7 +36,7 @@ CCTK_FILEVERSION(CactusConnect_HTTPD_Startup_c) ********************* Local Routine Prototypes ********************* ********************************************************************/ -#ifdef PTHREADS +#ifdef CCTK_PTHREADS static void * HTTP_Thread(void *cctkGH); static void HTTP_SetupPollingThread(cGH *cctkGH); #endif @@ -57,7 +57,7 @@ int HTTP_Shutdown(void); ********************* Local Data ***************************** ********************************************************************/ -#ifdef PTHREADS +#ifdef CCTK_PTHREADS static pthread_t polling_thread; static int thread_started = 0; #endif @@ -147,7 +147,7 @@ void HTTP_Work(CCTK_ARGUMENTS) httpState state; -#ifdef PTHREADS +#ifdef CCTK_PTHREADS if(CCTK_MyProc(cctkGH) == 0 && use_pthreads && ! thread_started) { HTTP_SetupPollingThread(cctkGH); @@ -158,7 +158,7 @@ void HTTP_Work(CCTK_ARGUMENTS) do { -#ifdef PTHREADS +#ifdef CCTK_PTHREADS if(!use_pthreads) { #endif @@ -166,7 +166,7 @@ void HTTP_Work(CCTK_ARGUMENTS) { HTTP_Poll(cctkGH, state.timeout_seconds, state.timeout_useconds); } -#ifdef PTHREADS +#ifdef CCTK_PTHREADS } #endif @@ -203,7 +203,7 @@ void HTTP_Work(CCTK_ARGUMENTS) int HTTP_Shutdown(void) { DECLARE_CCTK_PARAMETERS -#ifdef PTHREADS +#ifdef CCTK_PTHREADS /* Wait for the polling thread to exit */ if(CCTK_MyProc(NULL) == 0 && use_pthreads && thread_started) { @@ -244,7 +244,7 @@ int HTTP_Shutdown(void) @endvar @@*/ -#ifdef PTHREADS +#ifdef CCTK_PTHREADS static void * HTTP_Thread(void *cctkGH) { CCTK_INT *terminate; @@ -295,4 +295,4 @@ static void HTTP_SetupPollingThread(cGH *cctkGH) thread_started = 1; } } -#endif /* PTHREADS */ +#endif /* CCTK_PTHREADS */ diff --git a/src/Steer.c b/src/Steer.c index 61db400..b91f711 100644 --- a/src/Steer.c +++ b/src/Steer.c @@ -13,7 +13,7 @@ #include "cctk.h" #endif -#ifdef PTHREADS +#ifdef CCTK_PTHREADS #include <pthread.h> #endif @@ -62,7 +62,7 @@ static void ByteSwap(void *buf,int nelements,int elementsize); static char *queuebuffer = NULL; static int queuebuffer_size = 0; -#ifdef PTHREADS +#ifdef CCTK_PTHREADS static pthread_mutex_t steer_mutex = PTHREAD_MUTEX_INITIALIZER; #endif @@ -93,7 +93,7 @@ int HTTP_SteerQueue(const char *thorn, const char *parameter, const char *value) retval = 0; -#ifdef PTHREADS +#ifdef CCTK_PTHREADS pthread_mutex_lock(&steer_mutex); #endif @@ -125,7 +125,7 @@ int HTTP_SteerQueue(const char *thorn, const char *parameter, const char *value) thorn,parameter, value); } -#ifdef PTHREADS +#ifdef CCTK_PTHREADS pthread_mutex_unlock(&steer_mutex); #endif @@ -148,7 +148,7 @@ int HTTP_SteerQueue(const char *thorn, const char *parameter, const char *value) @@*/ int HTTP_SteerDispatch(void) { -#ifdef PTHREADS +#ifdef CCTK_PTHREADS pthread_mutex_lock(&steer_mutex); #endif @@ -156,7 +156,7 @@ int HTTP_SteerDispatch(void) SteerParameters(); -#ifdef PTHREADS +#ifdef CCTK_PTHREADS pthread_mutex_unlock(&steer_mutex); #endif |