Skip to content
Permalink
Browse files

Fix loop thread Database

  • Loading branch information...
icekobrin committed Apr 25, 2019
1 parent 7afeab2 commit 3ab485f249fd9eaf41d500972188d74cc174d626
Showing with 7 additions and 0 deletions.
  1. +1 −0 src/db_load.cpp
  2. +5 −0 src/sys_thread.c
  3. +1 −0 src/sys_thread.h
@@ -1656,6 +1656,7 @@ void __cdecl __noreturn DB_Thread(unsigned int threadContext)
while ( 1 )
{
Sys_WaitStartDatabase();
Sys_WakeDatabaseEventReset();
DB_TryLoadXFile();
}
}
@@ -313,6 +313,11 @@ void Sys_WaitStartDatabase()
Sys_WaitForObject(wakeDatabaseEvent);
}

void Sys_WakeDatabaseEventReset()
{
Sys_ResetEvent(wakeDatabaseEvent);
}

qboolean Sys_IsDatabaseThread()
{
threadid_t curtid;
@@ -103,6 +103,7 @@ void Sys_ExitThread(int code);
void Sys_RunDelegatedEvents();
void Sys_SleepUSec(int usec);
void __cdecl Sys_WaitStartDatabase();
void Sys_WakeDatabaseEventReset();
qboolean __cdecl Sys_SpawnDatabaseThread(void (*db_proc)(unsigned int p));
void __cdecl Sys_DatabaseCompleted();
void Sys_WakeDatabase();

0 comments on commit 3ab485f

Please sign in to comment.
You can’t perform that action at this time.