Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 278f28cc rédigé par Kubat's avatar Kubat
Parcourir les fichiers

MISC: Write some things in a simpler way

parent 28a7c91f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!184Draft: Windows build rebased
......@@ -97,6 +97,7 @@ typedef int SOCKET;
#define fdopen _fdopen
#define mkdir(str, perm) _mkdir(str)
#define socket(dom, type, proto__) WSASocket(dom, type, 0, 0, 0, 0)
#define get_nprocs_conf() 2
#endif
......
......@@ -80,11 +80,8 @@ worker_pool_thread(void *___pool)
--(pool->thread_working);
assert(!pthread_mutex_unlock((pthread_mutex_t *)&pool->lock));
}
#if !(defined(LKT_OS_WIN) && (LKT_OS_WIN == 1))
pthread_exit(NULL);
#else
return NULL;
#endif
}
PRIVATE_FUNCTION WORKER_STATUS
......@@ -124,11 +121,7 @@ PRIVATE_FUNCTION int
worker_pool_new(struct worker_pool *ret, size_t init_size, size_t thread_count)
{
if (!thread_count) {
#if !(defined(LKT_OS_WIN) && (LKT_OS_WIN == 1))
const int nprocs = get_nprocs_conf();
#else
const int nprocs = 2;
#endif
assert(nprocs > 0);
thread_count = (size_t)nprocs;
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter