diff --git a/inc/lektor/internal/os.h b/inc/lektor/internal/os.h index 80bd2640394dd3f9169f042b794980bf2292c3b5..bdea7fb94ac053bdd723c72545b8b753805406c1 100644 --- a/inc/lektor/internal/os.h +++ b/inc/lektor/internal/os.h @@ -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 diff --git a/inc/lektor/internal/worker.h b/inc/lektor/internal/worker.h index c781b5820e53d8eb6ce3e61c602fbf0665b004e8..b5d171006502c14d9b9eadcba7c5f2a60ed7e840 100644 --- a/inc/lektor/internal/worker.h +++ b/inc/lektor/internal/worker.h @@ -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; }