]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move activity to haproxy/
authorWilly Tarreau <w@1wt.eu>
Tue, 2 Jun 2020 08:29:48 +0000 (10:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
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.

14 files changed:
include/common/buffer.h
include/haproxy/activity-t.h [moved from include/types/activity.h with 85% similarity]
include/haproxy/activity.h [moved from include/proto/activity.h with 84% similarity]
include/proto/fd.h
src/activity.c
src/cli.c
src/ev_epoll.c
src/ev_evports.c
src/ev_kqueue.c
src/ev_poll.c
src/ev_select.c
src/haproxy.c
src/pool.c
src/stream.c

index a42fc25ab39de81f5f8febbc6b2c10f4faf75465..4e19c22c2f0611d91919db4a9292e3eedf4ca24b 100644 (file)
@@ -33,7 +33,7 @@
 #include <haproxy/istbuf.h>
 #include <haproxy/pool.h>
 
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 
 /* an element of the <buffer_wq> list. It represents an object that need to
  * acquire a buffer to continue its process. */
similarity index 85%
rename from include/types/activity.h
rename to include/haproxy/activity-t.h
index 5ebbd1405e6bc7e04f10115d725fb87828ea6666..3bc81b348f0c1a53d928b2cf305b1a711da4391b 100644 (file)
@@ -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
  * 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 <haproxy/api-t.h>
 #include <haproxy/freq_ctr-t.h>
 
+/* 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:
similarity index 84%
rename from include/proto/activity.h
rename to include/haproxy/activity.h
index ce6a81b5fd305531c7730b109276234fec7e5c3d..452e5f8472673bf07680ee57f19500c5bc2abde1 100644 (file)
@@ -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
  * 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 <haproxy/atomic.h>
 #include <haproxy/api.h>
 #include <haproxy/time.h>
-#include <types/activity.h>
+#include <haproxy/activity-t.h>
 #include <haproxy/freq_ctr.h>
 
-/* 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:
index f882b54a771d8973b27895b24245db4afb18e30a..2d45e0666c1e6bd91a28836e8da73ce8e238040f 100644 (file)
@@ -31,7 +31,7 @@
 #include <common/ticks.h>
 #include <haproxy/time.h>
 #include <types/fd.h>
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 
 /* public variables */
 
index 0732197a302af99afe4c654a33b388ac1718bc4d..c0da3e84bd4dfc5b54847bb5dc260ae43b04d7e0 100644 (file)
@@ -14,7 +14,7 @@
 #include <common/cfgparse.h>
 #include <common/standard.h>
 #include <haproxy/thread-t.h>
-#include <types/activity.h>
+#include <haproxy/activity-t.h>
 #include <proto/channel.h>
 #include <proto/cli.h>
 #include <haproxy/freq_ctr.h>
index 8084dfd464ff0070b85938bfa17eb81f09730a35..b9a23692a52e5941d74681837298156e26f3df07 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -41,7 +41,7 @@
 #include <types/dns.h>
 #include <types/stats.h>
 
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/backend.h>
 #include <proto/channel.h>
 #include <proto/checks.h>
index 8378383af867d46b27c8169ad4b9cfc2e7342ffc..4ddf8c5738c1af05131a07bf80b30088a070bd16 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <types/global.h>
 
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/fd.h>
 #include <proto/signal.h>
 
index 359acf9532aebf3d3855693648562618a3704244..b65c18e3be5db6e23a0c778be6b9277c73e94fae 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <types/global.h>
 
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/fd.h>
 #include <proto/log.h>
 #include <proto/signal.h>
index efc2ecf760ee7347df8fc56bd98e49cdd0f67bc2..ee8802051cb8af1c64961a35ac739ae479b0e1bb 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <types/global.h>
 
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/fd.h>
 #include <proto/signal.h>
 
index 7239732d83bdb27557dcafc7070cd86f5d3c328d..0d0c147d0fc35c6c4d4f243daa139ee390534634 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <types/global.h>
 
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/fd.h>
 
 
index 9168f59aa9d06636ba9a480e95194876ea506ffb..c1e3edf6da1de64455aec768d498c00e31c35926 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <types/global.h>
 
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/fd.h>
 
 
index 40d31d761055efa70e1a56acfafd44c16bf74401..99e89075ef6ae9949ba81e526cefebd9bfcfbf1f 100644 (file)
 #include <types/peers.h>
 
 #include <proto/acl.h>
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/arg.h>
 #include <proto/auth.h>
 #include <proto/backend.h>
index 3a4b34cf5c620104790f14af6cce90dee98d44b4..2ad2be629786e20c3f706ff15fe147abb1721706 100644 (file)
@@ -23,7 +23,7 @@
 #include <haproxy/list.h>
 #include <common/standard.h>
 
-#include <types/activity.h>
+#include <haproxy/activity-t.h>
 
 #include <proto/applet.h>
 #include <proto/cli.h>
index 955bc4466b956dc0d709b35e29339702fbe9fe78..b6b2e1450cf951391a8cd0db5e4e3aa3371dc170 100644 (file)
@@ -30,7 +30,7 @@
 
 #include <proto/acl.h>
 #include <proto/action.h>
-#include <proto/activity.h>
+#include <haproxy/activity.h>
 #include <proto/arg.h>
 #include <proto/backend.h>
 #include <proto/channel.h>