Commit 842fdbde authored by Christopher Friedt's avatar Christopher Friedt Committed by Chris Friedt
Browse files

samples: posix: philosophers: fix off-by-one error



The number of forks should match the number of philophers, and
that is encoded via NUM_PHIL.

Change the build assert to match.

Signed-off-by: default avatarChristopher Friedt <cfriedt@meta.com>
parent 9122e853
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#define obj_init_type "POSIX"
#define fork_type_str "mutexes"

BUILD_ASSERT(CONFIG_MAX_PTHREAD_COUNT == CONFIG_MAX_PTHREAD_MUTEX_COUNT - 1);
BUILD_ASSERT(CONFIG_MAX_PTHREAD_COUNT == CONFIG_MAX_PTHREAD_MUTEX_COUNT);
BUILD_ASSERT(CONFIG_DYNAMIC_THREAD_POOL_SIZE == CONFIG_MAX_PTHREAD_COUNT);

typedef pthread_mutex_t *fork_t;