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
This commit is contained in:
parent
0f7f3c0d54
commit
3fb735cc74
2 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,8 @@
|
||||||
#define BLOCKDRIVER_MT_API 1 /* do not expose the singlethreaded API */
|
#define BLOCKDRIVER_MT_API 1 /* do not expose the singlethreaded API */
|
||||||
#include <minix/blockdriver.h>
|
#include <minix/blockdriver.h>
|
||||||
|
|
||||||
|
#define BLOCKDRIVER_MAX_DEVICES 32
|
||||||
|
|
||||||
void blockdriver_mt_task(struct blockdriver *driver_tab);
|
void blockdriver_mt_task(struct blockdriver *driver_tab);
|
||||||
void blockdriver_mt_sleep(void);
|
void blockdriver_mt_sleep(void);
|
||||||
void blockdriver_mt_wakeup(thread_id_t id);
|
void blockdriver_mt_wakeup(thread_id_t id);
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#define STACK_SIZE 8192
|
#define STACK_SIZE 8192
|
||||||
|
|
||||||
/* Maximum number of devices supported. */
|
/* Maximum number of devices supported. */
|
||||||
#define MAX_DEVICES 32
|
#define MAX_DEVICES BLOCKDRIVER_MAX_DEVICES
|
||||||
|
|
||||||
/* The maximum number of worker threads per device. */
|
/* The maximum number of worker threads per device. */
|
||||||
#define MAX_WORKERS 32
|
#define MAX_WORKERS 32
|
||||||
|
|
Loading…
Reference in a new issue