Hard limits moved to limits.h

Limits used with SO_[RCV|SEND]BUF moved from gw.h to limits.h and
renamed so that the prefix is MXS_.
This commit is contained in:
Johan Wikman
2016-10-17 09:58:45 +03:00
parent 4faa7f8d21
commit 8aafa34d66
4 changed files with 46 additions and 18 deletions

View File

@ -41,15 +41,6 @@ MXS_BEGIN_DECLS
// network buffer is 32K
#define MAX_BUFFER_SIZE 32768
/**
* Configuration for send and receive socket buffer sizes for
* backend and cleint connections.
*/
#define GW_BACKEND_SO_SNDBUF (128 * 1024)
#define GW_BACKEND_SO_RCVBUF (128 * 1024)
#define GW_CLIENT_SO_SNDBUF (128 * 1024)
#define GW_CLIENT_SO_RCVBUF (128 * 1024)
#define GW_NOINTR_CALL(A) do { errno = 0; A; } while (errno == EINTR)
bool gw_daemonize(void);

View File

@ -18,12 +18,49 @@
MXS_BEGIN_DECLS
// This file defines hard limits of MaxScale.
/**
* @file lmits.h
*
* This file contains defines for hard limits of MaxScale.
*/
// Thread information is stored in a bitmask whose size must be a
// multiple of 8. The bitmask is indexed using the thread id that start
// from 1. Hence, the hard maximum number of threads must be a
// multiple of 8 minus 1.
/**
* MXS_BACKEND_SO_RCVBUF
*
* The value used when setting SO_RCVBUF of backend sockets.
*/
#define MXS_BACKEND_SO_RCVBUF (128 * 1024)
/**
* MSX_BACKEND_SO_SNDBUF
*
* The value used when setting SO_SNDBUF of backend sockets.
*/
#define MXS_BACKEND_SO_SNDBUF (128 * 1024)
/**
* MXS_CLIENT_SO_RCVBUF
*
* The value used when setting SO_RCVBUF of client sockets.
*/
#define MXS_CLIENT_SO_RCVBUF (128 * 1024)
/**
* MXS_CLIENT_SO_SNDBUF
*
* The value used when setting SO_SNDBUF of client sockets.
*/
#define MXS_CLIENT_SO_SNDBUF (128 * 1024)
/**
* MXS_MAX_THREADS
*
* Thread information is stored in a bitmask whose size must be a
* multiple of 8. The bitmask is indexed using the thread id that start
* from 1. Hence, the hard maximum number of threads must be a
* multiple of 8 minus 1.
*/
#define MXS_MAX_THREADS 255
MXS_END_DECLS