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: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2024-01-31 00:40:01 -05:00 committed by Chris Friedt
parent 9122e8530f
commit 842fdbdea6

View file

@ -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;