20 #include "JackGlobals.h" 25 bool JackGlobals::fVerbose = 0;
27 jack_tls_key JackGlobals::fRealTimeThread;
28 static bool gKeyRealtimeThreadInitialized = jack_tls_allocate_key(&JackGlobals::fRealTimeThread);
30 jack_tls_key JackGlobals::fNotificationThread;
31 static bool gKeyNotificationThreadInitialized = jack_tls_allocate_key(&JackGlobals::fNotificationThread);
33 jack_tls_key JackGlobals::fKeyLogFunction;
34 static bool fKeyLogFunctionInitialized = jack_tls_allocate_key(&JackGlobals::fKeyLogFunction);
36 JackMutex* JackGlobals::fOpenMutex =
new JackMutex();
37 JackMutex* JackGlobals::fSynchroMutex =
new JackMutex();
38 volatile bool JackGlobals::fServerRunning =
false;
39 JackClient* JackGlobals::fClientTable[CLIENT_NUM] = {};
42 jack_thread_creator_t JackGlobals::fJackThreadCreator = pthread_create;
45 #ifdef __CLIENTDEBUG__ 47 std::ofstream* JackGlobals::fStream = NULL;
49 void JackGlobals::CheckContext(
const char* name)
51 if (JackGlobals::fStream == NULL) {
57 curtime = time (NULL);
59 loctime = localtime (&curtime);
60 strftime(buffer, 256,
"%I-%M", loctime);
61 snprintf(provstr,
sizeof(provstr),
"JackAPICall-%s.log", buffer);
62 JackGlobals::fStream =
new std::ofstream(provstr, std::ios_base::ate);
63 JackGlobals::fStream->is_open();
66 (*fStream) <<
"JACK API call : " << name <<
", calling thread : " << pthread_self().p << std::endl;
67 #elif defined(WIN32) && !defined(__CYGWIN__) 68 (*fStream) <<
"JACK API call : " << name <<
", calling thread : " << GetCurrentThread() << std::endl;
70 (*fStream) <<
"JACK API call : " << name <<
", calling thread : " << pthread_self() << std::endl;
76 void JackGlobals::CheckContext(
const char* name)