mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Force thread count to 1 when pthreads is unavailable.
Don't want the thread count being misreported.
This commit is contained in:
parent
fa1514798b
commit
aebd9288cd
1 changed files with 5 additions and 2 deletions
|
@ -111,6 +111,9 @@ InitThreads (void)
|
||||||
stats_lock = malloc (sizeof (pthread_rwlock_t));
|
stats_lock = malloc (sizeof (pthread_rwlock_t));
|
||||||
if (pthread_rwlock_init (stats_lock, 0))
|
if (pthread_rwlock_init (stats_lock, 0))
|
||||||
Sys_Error ("pthread_rwlock_init failed");
|
Sys_Error ("pthread_rwlock_init failed");
|
||||||
|
#else
|
||||||
|
// Unable to run multi-threaded, so force threadcount to 1
|
||||||
|
options.threads = 1;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1112,14 +1115,14 @@ main (int argc, char **argv)
|
||||||
dstring_t *portalfile = dstring_new ();
|
dstring_t *portalfile = dstring_new ();
|
||||||
QFile *f;
|
QFile *f;
|
||||||
|
|
||||||
InitThreads ();
|
|
||||||
|
|
||||||
start = Sys_DoubleTime ();
|
start = Sys_DoubleTime ();
|
||||||
|
|
||||||
this_program = argv[0];
|
this_program = argv[0];
|
||||||
|
|
||||||
DecodeArgs (argc, argv);
|
DecodeArgs (argc, argv);
|
||||||
|
|
||||||
|
InitThreads ();
|
||||||
|
|
||||||
if (!options.bspfile) {
|
if (!options.bspfile) {
|
||||||
usage (1);
|
usage (1);
|
||||||
Sys_Error ("%s: no bsp file specified.", this_program);
|
Sys_Error ("%s: no bsp file specified.", this_program);
|
||||||
|
|
Loading…
Reference in a new issue