diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-06-19 08:38:52 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-06-19 08:38:52 +0000 |
commit | 5e529289f2b5c5a6a4fb917d447c42913c20e6f6 (patch) | |
tree | 5bd53d8ed547933aa91952b4195635aa8fd379a9 | |
parent | 3ccb31387d610da6525c464015f7688e71901ea5 (diff) | |
download | cmogstored-5e529289f2b5c5a6a4fb917d447c42913c20e6f6.tar.gz |
Unfortunately, quasi-standard MIN/MAX macros are confusing to me :x This fixes the code to match the comment describing the reasoning for limiting threads.
-rw-r--r-- | svc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -210,7 +210,7 @@ bool mog_svc_start_each(void *svc_ptr, void *main_ptr) * Increasing threads here just leads to lock contention inside the * kernel (accept/accept4/EPOLL_CTL_ADD) */ - athr = mog_main->worker_processes > 1 ? 1 : MAX(2, athr); + athr = mog_main->worker_processes > 1 ? 1 : MIN(2, athr); svc->queue = q; mog_thrpool_start(&q->thrpool, nthr, mog_queue_loop, q); |