Add hard thread limit
The hard thread limit is now defined in maxscale/limits.h. If the specified number of threads is larger than that, it will be adjusted down. The size of the GWBITMASK is now also defined using that number, so there will always be enough bits for representing all threads.
This commit is contained in:
@ -12,7 +12,9 @@
|
||||
* of this software will be governed by version 2 or later of the General
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#include <spinlock.h>
|
||||
#include <maxscale/limits.h>
|
||||
|
||||
/**
|
||||
* @file gwbitmask.h An implementation of an arbitrarily long bitmask
|
||||
@ -28,7 +30,7 @@
|
||||
*/
|
||||
|
||||
/* This number MUST an be exact multiple of 8 */
|
||||
#define MXS_BITMASK_LENGTH 256 /**< Number of bits in the bitmask */
|
||||
#define MXS_BITMASK_LENGTH (MXS_MAX_THREADS + 1) /**< Number of bits in the bitmask */
|
||||
|
||||
#define MXS_BITMASK_SIZE (MXS_BITMASK_LENGTH / 8) /**< Number of bytes in the bitmask */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user