void Sys_Quit (int returnvalue)
{
// Unlock mutexes because the quit command may jump directly here, causing a deadlock
- if (cmd_client.text_lock)
+ if (cmd_client.text_mutex)
Cbuf_Unlock(&cmd_client);
- if (cmd_server.text_lock)
+ if (cmd_server.text_mutex)
Cbuf_Unlock(&cmd_server);
SV_UnlockThreadMutex();
TaskQueue_Frame(true);
{
QueryPerformanceCounter (&PerformanceCount);
- #ifdef __BORLANDC__
- timescale = 1.0 / ((double) PerformanceFreq.u.LowPart + (double) PerformanceFreq.u.HighPart * 65536.0 * 65536.0);
- return ((double) PerformanceCount.u.LowPart + (double) PerformanceCount.u.HighPart * 65536.0 * 65536.0) * timescale;
- #else
timescale = 1.0 / ((double) PerformanceFreq.LowPart + (double) PerformanceFreq.HighPart * 65536.0 * 65536.0);
return ((double) PerformanceCount.LowPart + (double) PerformanceCount.HighPart * 65536.0 * 65536.0) * timescale;
- #endif
}
else
{
static int CPUID_Features(void)
{
int features = 0;
-# if defined(__GNUC__) && defined(__i386__)
+# if defined((__GNUC__) || (__clang__) || (__TINYC__)) && defined(__i386__)
__asm__ (
" movl %%ebx,%%edi\n"
" xorl %%eax,%%eax \n"