From 3fb735cc74f5daddb5ab282cb593e855ba78a5af Mon Sep 17 00:00:00 2001 From: David van Moolenbroek Date: Tue, 10 Sep 2013 23:35:15 +0200 Subject: [PATCH] libblockdriver: expose BLOCKDRIVER_MAX_DEVICES This constant determines the range of valid device_id_t values that a block driver can return from the bdr_device hook: a value between 0 and (BLOCKDRIVER_MAX_DEVICES - 1) inclusive. Change-Id: I80fac469e88ac13d4b869007e6f2c2f7569da433 --- include/minix/blockdriver_mt.h | 2 ++ lib/libblockdriver/const.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/minix/blockdriver_mt.h b/include/minix/blockdriver_mt.h index d3cf62563..2b96c505d 100644 --- a/include/minix/blockdriver_mt.h +++ b/include/minix/blockdriver_mt.h @@ -4,6 +4,8 @@ #define BLOCKDRIVER_MT_API 1 /* do not expose the singlethreaded API */ #include +#define BLOCKDRIVER_MAX_DEVICES 32 + void blockdriver_mt_task(struct blockdriver *driver_tab); void blockdriver_mt_sleep(void); void blockdriver_mt_wakeup(thread_id_t id); diff --git a/lib/libblockdriver/const.h b/lib/libblockdriver/const.h index 5f475e3e9..1b3495bfa 100644 --- a/lib/libblockdriver/const.h +++ b/lib/libblockdriver/const.h @@ -5,7 +5,7 @@ #define STACK_SIZE 8192 /* Maximum number of devices supported. */ -#define MAX_DEVICES 32 +#define MAX_DEVICES BLOCKDRIVER_MAX_DEVICES /* The maximum number of worker threads per device. */ #define MAX_WORKERS 32 -- 2.44.0