[openssl.org #2951] [PATCH] Fix speed.c to fork N threads
As noted by the submitter, the ticket is wrong and the code is right. -- Rich Salz, OpenSSL dev team; rs...@openssl.org __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
Re: [openssl.org #2951] [PATCH] Fix speed.c to fork N threads
- for(n=0 ; n multi ; ++n) + for(n=0 ; n = multi ; ++n) Isn't |[0..n)| = n and |[0..n]| = n +1 ? I.e this patch will do one more iteration than expected? Assume multi = 1, for example.
Re: [openssl.org #2951] [PATCH] Fix speed.c to fork N threads
You're correct, my mistake. I missed that after switching to human readable output for parallel benchmark and misread it. Thanks! Regards, Jamie Gloudon __ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org
[openssl.org #2951] [PATCH] Fix speed.c to fork N threads
Hi, Another quick fix for speed benchmark to fork N threads instead of N-1 threads. Regards, Jamie Gloudon --- a/apps/speed.c 2012-09-28 05:25:49.0 -0400 +++ b/apps/speed.c 2012-12-28 00:00:23.744837319 -0400 @@ -2651,7 +2651,7 @@ static char sep[]=:; fds=malloc(multi*sizeof *fds); - for(n=0 ; n multi ; ++n) + for(n=0 ; n = multi ; ++n) { if (pipe(fd) == -1) {