mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-22 14:49:45 -04:00
BUILD: thread: move lock label definitions to thread-t.h
The 'lock_label' enum is defined in thread.h but it's used in a few type files, so let's move it to thread-t.h to allow explicit includes.
This commit is contained in:
parent
962c129dc1
commit
ac692d7ee5
2 changed files with 55 additions and 56 deletions
|
|
@ -162,4 +162,59 @@ struct ha_rwlock {
|
|||
|
||||
#endif /* DEBUG_THREAD */
|
||||
|
||||
/* WARNING!!! if you update this enum, please also keep lock_label() up to date
|
||||
* below.
|
||||
*/
|
||||
enum lock_label {
|
||||
TASK_RQ_LOCK,
|
||||
TASK_WQ_LOCK,
|
||||
LISTENER_LOCK,
|
||||
PROXY_LOCK,
|
||||
SERVER_LOCK,
|
||||
LBPRM_LOCK,
|
||||
SIGNALS_LOCK,
|
||||
STK_TABLE_LOCK,
|
||||
STK_SESS_LOCK,
|
||||
APPLETS_LOCK,
|
||||
PEER_LOCK,
|
||||
SHCTX_LOCK,
|
||||
SSL_LOCK,
|
||||
SSL_GEN_CERTS_LOCK,
|
||||
PATREF_LOCK,
|
||||
PATEXP_LOCK,
|
||||
VARS_LOCK,
|
||||
COMP_POOL_LOCK,
|
||||
LUA_LOCK,
|
||||
NOTIF_LOCK,
|
||||
SPOE_APPLET_LOCK,
|
||||
DNS_LOCK,
|
||||
PID_LIST_LOCK,
|
||||
EMAIL_ALERTS_LOCK,
|
||||
PIPES_LOCK,
|
||||
TLSKEYS_REF_LOCK,
|
||||
AUTH_LOCK,
|
||||
RING_LOCK,
|
||||
DICT_LOCK,
|
||||
PROTO_LOCK,
|
||||
QUEUE_LOCK,
|
||||
CKCH_LOCK,
|
||||
SNI_LOCK,
|
||||
SSL_SERVER_LOCK,
|
||||
SFT_LOCK, /* sink forward target */
|
||||
IDLE_CONNS_LOCK,
|
||||
OCSP_LOCK,
|
||||
QC_CID_LOCK,
|
||||
CACHE_LOCK,
|
||||
OTHER_LOCK,
|
||||
/* WT: make sure never to use these ones outside of development,
|
||||
* we need them for lock profiling!
|
||||
*/
|
||||
DEBUG1_LOCK,
|
||||
DEBUG2_LOCK,
|
||||
DEBUG3_LOCK,
|
||||
DEBUG4_LOCK,
|
||||
DEBUG5_LOCK,
|
||||
LOCK_LABELS
|
||||
};
|
||||
|
||||
#endif /* _HAPROXY_THREAD_T_H */
|
||||
|
|
|
|||
|
|
@ -386,62 +386,6 @@ int thread_cpu_mask_forced(void);
|
|||
#define HA_RWLOCK_TRYSKLOCK(lbl,l) __ha_rwlock_trysklock(lbl, l, __func__, __FILE__, __LINE__)
|
||||
#define HA_RWLOCK_TRYRDTOSK(lbl,l) __ha_rwlock_tryrdtosk(lbl, l, __func__, __FILE__, __LINE__)
|
||||
|
||||
/* WARNING!!! if you update this enum, please also keep lock_label() up to date
|
||||
* below.
|
||||
*/
|
||||
enum lock_label {
|
||||
TASK_RQ_LOCK,
|
||||
TASK_WQ_LOCK,
|
||||
LISTENER_LOCK,
|
||||
PROXY_LOCK,
|
||||
SERVER_LOCK,
|
||||
LBPRM_LOCK,
|
||||
SIGNALS_LOCK,
|
||||
STK_TABLE_LOCK,
|
||||
STK_SESS_LOCK,
|
||||
APPLETS_LOCK,
|
||||
PEER_LOCK,
|
||||
SHCTX_LOCK,
|
||||
SSL_LOCK,
|
||||
SSL_GEN_CERTS_LOCK,
|
||||
PATREF_LOCK,
|
||||
PATEXP_LOCK,
|
||||
VARS_LOCK,
|
||||
COMP_POOL_LOCK,
|
||||
LUA_LOCK,
|
||||
NOTIF_LOCK,
|
||||
SPOE_APPLET_LOCK,
|
||||
DNS_LOCK,
|
||||
PID_LIST_LOCK,
|
||||
EMAIL_ALERTS_LOCK,
|
||||
PIPES_LOCK,
|
||||
TLSKEYS_REF_LOCK,
|
||||
AUTH_LOCK,
|
||||
RING_LOCK,
|
||||
DICT_LOCK,
|
||||
PROTO_LOCK,
|
||||
QUEUE_LOCK,
|
||||
CKCH_LOCK,
|
||||
SNI_LOCK,
|
||||
SSL_SERVER_LOCK,
|
||||
SFT_LOCK, /* sink forward target */
|
||||
IDLE_CONNS_LOCK,
|
||||
OCSP_LOCK,
|
||||
QC_CID_LOCK,
|
||||
CACHE_LOCK,
|
||||
OTHER_LOCK,
|
||||
/* WT: make sure never to use these ones outside of development,
|
||||
* we need them for lock profiling!
|
||||
*/
|
||||
DEBUG1_LOCK,
|
||||
DEBUG2_LOCK,
|
||||
DEBUG3_LOCK,
|
||||
DEBUG4_LOCK,
|
||||
DEBUG5_LOCK,
|
||||
LOCK_LABELS
|
||||
};
|
||||
|
||||
|
||||
/* Following functions are used to collect some stats about locks. We wrap
|
||||
* pthread functions to known how much time we wait in a lock. */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue