--- libeio/etp.c 2015/06/25 20:41:03 1.9 +++ libeio/etp.c 2018/08/14 11:44:53 1.13 @@ -37,6 +37,10 @@ * either the BSD or the GPL. */ +#if HAVE_SYS_PRCTL_H +# include +#endif + #ifndef ETP_API_DECL # define ETP_API_DECL static #endif @@ -588,10 +592,10 @@ } ETP_API_DECL void ecb_cold -etp_set_max_poll_time (etp_pool pool, double nseconds) +etp_set_max_poll_time (etp_pool pool, double seconds) { if (WORDACCESS_UNSAFE) X_LOCK (pool->reslock); - pool->max_poll_time = nseconds * ETP_TICKS; + pool->max_poll_time = seconds * ETP_TICKS; if (WORDACCESS_UNSAFE) X_UNLOCK (pool->reslock); } @@ -604,10 +608,10 @@ } ETP_API_DECL void ecb_cold -etp_set_max_idle (etp_pool pool, unsigned int nthreads) +etp_set_max_idle (etp_pool pool, unsigned int threads) { if (WORDACCESS_UNSAFE) X_LOCK (pool->reqlock); - pool->max_idle = nthreads; + pool->max_idle = threads; if (WORDACCESS_UNSAFE) X_UNLOCK (pool->reqlock); } @@ -620,17 +624,17 @@ } ETP_API_DECL void ecb_cold -etp_set_min_parallel (etp_pool pool, unsigned int nthreads) +etp_set_min_parallel (etp_pool pool, unsigned int threads) { - if (pool->wanted < nthreads) - pool->wanted = nthreads; + if (pool->wanted < threads) + pool->wanted = threads; } ETP_API_DECL void ecb_cold -etp_set_max_parallel (etp_pool pool, unsigned int nthreads) +etp_set_max_parallel (etp_pool pool, unsigned int threads) { - if (pool->wanted > nthreads) - pool->wanted = nthreads; + if (pool->wanted > threads) + pool->wanted = threads; while (pool->started > pool->wanted) etp_end_thread (pool);