Skip to content

Commit

Permalink
Although PTHREAD_THREADS_MAX is a guestimate, should assume it isn't.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Johnson committed Jul 22, 2021
1 parent 2b0a86c commit 998f7ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/sequence1.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
* - unique sequence numbers are generated for every new thread.
*
* Fail Criteria:
* -
* -
*/

#include "test.h"
Expand All @@ -77,7 +77,7 @@
*/

enum {
NUMTHREADS = PTHREAD_THREADS_MAX
NUMTHREADS = PTHREAD_THREADS_MAX - 2
};


Expand All @@ -86,7 +86,7 @@ static long done = 0;
* seqmap should have 1 in every element except [0]
* Thread sequence numbers start at 1 and we will also
* include this main thread so we need NUMTHREADS+2
* elements.
* elements.
*/
static UINT64 seqmap[NUMTHREADS+2];

Expand All @@ -96,9 +96,9 @@ void * func(void * arg)
seqmap[(int)pthread_getunique_np(pthread_self())] = 1;
InterlockedIncrement(&done);

return (void *) 0;
return (void *) 0;
}

int
main()
{
Expand Down

0 comments on commit 998f7ca

Please sign in to comment.