From: Willy Tarreau Date: Tue, 2 Jun 2020 08:29:48 +0000 (+0200) Subject: REORG: include: move activity to haproxy/ X-Git-Tag: v2.2-dev9~107 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a04ded58dc4c0252c569329a177a33c39570cc85;p=thirdparty%2Fhaproxy.git REORG: include: move activity to haproxy/ This moves types/activity.h to haproxy/activity-t.h and proto/activity.h to haproxy/activity.h. The macros defining the bit field values for the profiling variable were moved to the type file to be more future-proof. --- diff --git a/include/common/buffer.h b/include/common/buffer.h index a42fc25ab3..4e19c22c2f 100644 --- a/include/common/buffer.h +++ b/include/common/buffer.h @@ -33,7 +33,7 @@ #include #include -#include +#include /* an element of the list. It represents an object that need to * acquire a buffer to continue its process. */ diff --git a/include/types/activity.h b/include/haproxy/activity-t.h similarity index 85% rename from include/types/activity.h rename to include/haproxy/activity-t.h index 5ebbd1405e..3bc81b348f 100644 --- a/include/types/activity.h +++ b/include/haproxy/activity-t.h @@ -1,8 +1,8 @@ /* - * include/types/activity.h + * include/haproxy/activity-t.h * This file contains structure declarations for activity measurements. * - * Copyright (C) 2000-2018 Willy Tarreau - w@1wt.eu + * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,12 +19,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _TYPES_ACTIVITY_H -#define _TYPES_ACTIVITY_H +#ifndef _HAPROXY_ACTIVITY_T_H +#define _HAPROXY_ACTIVITY_T_H #include #include +/* bit fields for the "profiling" global variable */ +#define HA_PROF_TASKS_OFF 0x00000000 /* per-task CPU profiling forced disabled */ +#define HA_PROF_TASKS_AUTO 0x00000001 /* per-task CPU profiling automatic */ +#define HA_PROF_TASKS_ON 0x00000002 /* per-task CPU profiling forced enabled */ +#define HA_PROF_TASKS_MASK 0x00000003 /* per-task CPU profiling mask */ + /* per-thread activity reports. It's important that it's aligned on cache lines * because some elements will be updated very often. Most counters are OK on * 32-bit since this will be used during debugging sessions for troubleshooting @@ -65,7 +71,7 @@ struct activity { char __end[0] __attribute__((aligned(64))); // align size to 64. }; -#endif /* _TYPES_ACTIVITY_H */ +#endif /* _HAPROXY_ACTIVITY_T_H */ /* * Local variables: diff --git a/include/proto/activity.h b/include/haproxy/activity.h similarity index 84% rename from include/proto/activity.h rename to include/haproxy/activity.h index ce6a81b5fd..452e5f8472 100644 --- a/include/proto/activity.h +++ b/include/haproxy/activity.h @@ -1,8 +1,8 @@ /* - * include/proto/activity.h + * include/haproxy/activity.h * This file contains macros and inline functions for activity measurements. * - * Copyright (C) 2000-2018 Willy Tarreau - w@1wt.eu + * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,26 +19,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _PROTO_ACTIVITY_H -#define _PROTO_ACTIVITY_H +#ifndef _HAPROXY_ACTIVITY_H +#define _HAPROXY_ACTIVITY_H #include #include #include -#include +#include #include -/* bit fields for "profiling" */ -#define HA_PROF_TASKS_OFF 0x00000000 /* per-task CPU profiling forced disabled */ -#define HA_PROF_TASKS_AUTO 0x00000001 /* per-task CPU profiling automatic */ -#define HA_PROF_TASKS_ON 0x00000002 /* per-task CPU profiling forced enabled */ -#define HA_PROF_TASKS_MASK 0x00000003 /* per-task CPU profiling mask */ - extern unsigned int profiling; extern unsigned long task_profiling_mask; extern struct activity activity[MAX_THREADS]; - void report_stolen_time(uint64_t stolen); /* Collect date and time information before calling poll(). This will be used @@ -99,7 +92,7 @@ static inline void activity_count_runtime() } -#endif /* _PROTO_ACTIVITY_H */ +#endif /* _HAPROXY_ACTIVITY_H */ /* * Local variables: diff --git a/include/proto/fd.h b/include/proto/fd.h index f882b54a77..2d45e0666c 100644 --- a/include/proto/fd.h +++ b/include/proto/fd.h @@ -31,7 +31,7 @@ #include #include #include -#include +#include /* public variables */ diff --git a/src/activity.c b/src/activity.c index 0732197a30..c0da3e84bd 100644 --- a/src/activity.c +++ b/src/activity.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/cli.c b/src/cli.c index 8084dfd464..b9a23692a5 100644 --- a/src/cli.c +++ b/src/cli.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/ev_epoll.c b/src/ev_epoll.c index 8378383af8..4ddf8c5738 100644 --- a/src/ev_epoll.c +++ b/src/ev_epoll.c @@ -22,7 +22,7 @@ #include -#include +#include #include #include diff --git a/src/ev_evports.c b/src/ev_evports.c index 359acf9532..b65c18e3be 100644 --- a/src/ev_evports.c +++ b/src/ev_evports.c @@ -25,7 +25,7 @@ #include -#include +#include #include #include #include diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c index efc2ecf760..ee8802051c 100644 --- a/src/ev_kqueue.c +++ b/src/ev_kqueue.c @@ -24,7 +24,7 @@ #include -#include +#include #include #include diff --git a/src/ev_poll.c b/src/ev_poll.c index 7239732d83..0d0c147d0f 100644 --- a/src/ev_poll.c +++ b/src/ev_poll.c @@ -24,7 +24,7 @@ #include -#include +#include #include diff --git a/src/ev_select.c b/src/ev_select.c index 9168f59aa9..c1e3edf6da 100644 --- a/src/ev_select.c +++ b/src/ev_select.c @@ -21,7 +21,7 @@ #include -#include +#include #include diff --git a/src/haproxy.c b/src/haproxy.c index 40d31d7610..99e89075ef 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -105,7 +105,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/pool.c b/src/pool.c index 3a4b34cf5c..2ad2be6297 100644 --- a/src/pool.c +++ b/src/pool.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/src/stream.c b/src/stream.c index 955bc4466b..b6b2e1450c 100644 --- a/src/stream.c +++ b/src/stream.c @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include