Mercurial > hg > freeDiameter
changeset 619:45a63d6448ea
Fix wrong operator in testfifo
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Mon, 06 Dec 2010 11:03:03 +0900 |
parents | 1dbc4c5397d6 |
children | bc7328e600f0 |
files | freeDiameter/tests/testfifo.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/freeDiameter/tests/testfifo.c Fri Dec 03 18:29:51 2010 +0900 +++ b/freeDiameter/tests/testfifo.c Mon Dec 06 11:03:03 2010 +0900 @@ -204,9 +204,12 @@ int count; int i; int nbr_threads; - +#ifdef _POSIX_THREAD_THREADS_MAX + nbr_threads = _POSIX_THREAD_THREADS_MAX; +#else /* _POSIX_THREAD_THREADS_MAX */ nbr_threads = sysconf(_SC_THREAD_THREADS_MAX); - if ((nbr_threads <= 0) || (nbr_threads > NBR_THREADS / 2)) { +#endif /* _POSIX_THREAD_THREADS_MAX */ + if ((nbr_threads <= 0) || (nbr_threads > NBR_THREADS * 2)) { nbr_threads = NBR_THREADS; } else { /* The local limit is bellow NBR_THREADS */