REORG: include: move ring to haproxy/ring{,-t}.h

Some includes were wrong in the type definition but beyond this no
change was needed.
This commit is contained in:
Willy Tarreau 2020-06-03 19:43:35 +02:00
parent 0f6ffd652e
commit d2ad57c352
6 changed files with 16 additions and 15 deletions

View File

@ -1,5 +1,5 @@
/*
* include/types/ring.h
* include/haproxy/ring-t.h
* This file provides definitions for ring buffers used for disposable data.
*
* Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu
@ -19,12 +19,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _TYPES_RING_H
#define _TYPES_RING_H
#ifndef _HAPROXY_RING_T_H
#define _HAPROXY_RING_T_H
#include <haproxy/api-t.h>
#include <haproxy/buf-t.h>
#include <import/ist.h>
#include <haproxy/list-t.h>
#include <haproxy/thread.h>
/* The code below handles circular buffers with single-producer and multiple
* readers (up to 255). The buffer storage area must remain always allocated.
@ -100,7 +101,7 @@ struct ring {
int readers_count;
};
#endif /* _TYPES_RING_H */
#endif /* _HAPROXY_RING_T_H */
/*
* Local variables:

View File

@ -1,6 +1,6 @@
/*
* include/proto/ring.h
* This file provides definitions for ring buffers used for disposable data.
* include/haproxy/ring.h
* Exported functions for ring buffers used for disposable data.
*
* Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu
*
@ -19,12 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _PROTO_RING_H
#define _PROTO_RING_H
#ifndef _HAPROXY_RING_H
#define _HAPROXY_RING_H
#include <stdlib.h>
#include <import/ist.h>
#include <types/ring.h>
#include <haproxy/ring-t.h>
struct ring *ring_new(size_t size);
struct ring *ring_resize(struct ring *ring, size_t size);
@ -36,7 +36,7 @@ int ring_attach_cli(struct ring *ring, struct appctx *appctx);
int cli_io_handler_show_ring(struct appctx *appctx);
void cli_io_release_show_ring(struct appctx *appctx);
#endif /* _PROTO_RING_H */
#endif /* _HAPROXY_RING_H */
/*
* Local variables:

View File

@ -28,7 +28,7 @@
#include <haproxy/api-t.h>
#include <haproxy/thread.h>
#include <haproxy/list-t.h>
#include <types/ring.h>
#include <haproxy/ring-t.h>
#define NB_LOG_FACILITIES 24
#define NB_LOG_LEVELS 8

View File

@ -39,7 +39,7 @@
#include <haproxy/fd.h>
#include <proto/frontend.h>
#include <proto/log.h>
#include <proto/ring.h>
#include <haproxy/ring.h>
#include <proto/sample.h>
#include <proto/sink.h>
#include <proto/ssl_sock.h>

View File

@ -24,7 +24,7 @@
#include <haproxy/thread.h>
#include <types/applet.h>
#include <proto/cli.h>
#include <proto/ring.h>
#include <haproxy/ring.h>
#include <proto/stream_interface.h>
/* Creates and returns a ring buffer of size <size> bytes. Returns NULL on

View File

@ -25,7 +25,7 @@
#include <haproxy/time.h>
#include <proto/cli.h>
#include <proto/log.h>
#include <proto/ring.h>
#include <haproxy/ring.h>
#include <proto/signal.h>
#include <proto/sink.h>
#include <proto/stream_interface.h>