Move gloabl variables to their likely home source

The previous commit broke "make check"
parent d7dc0556
......@@ -46,6 +46,10 @@
#include "vas.h"
/* global variables, see varnishevent.h */
struct config config;
struct logconf logconf;
static const int facilitynum[8] =
{ LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5,
LOG_LOCAL6, LOG_LOCAL7 };
......
......@@ -47,6 +47,16 @@
#include "vsb.h"
#include "vmb.h"
/* global variables, see varnishevent.h */
chunk_t *chunks;
unsigned nchunks;
rec_t *records;
unsigned nrecords;
rec_node_t *rec_nodes;
tx_t *txn;
unsigned tx_occ, rec_occ, chunk_occ, tx_occ_hi, rec_occ_hi, chunk_occ_hi,
global_nfree_tx, global_nfree_rec, global_nfree_chunk;
#define __offsetof(st, m) offsetof(st,m)
/* Preprend head2 before head1, result in head1, head2 empty afterward */
......
......@@ -55,6 +55,15 @@
#define OBUF_SIZE 4096
#endif
/* global variables, see varnishevent.h */
int max_idx;
int tag2idx[MAX_VSL_TAG];
int nonrecs_wanted[VSL_t__MAX];
struct vbitmap *tag_no_hdr[VSL_t__MAX];
struct hdrt_node *hdr_trie[MAX_VSL_TAG];
typedef struct compiled_fmt_t {
char **str;
formatter_f **formatter;
......
......@@ -90,26 +90,6 @@
/* global variables, see varnishevent.h */
struct sigaction default_action;
int tag2idx[MAX_VSL_TAG];
int max_idx;
chunk_t *chunks;
unsigned nchunks;
rec_t *records;
unsigned nrecords;
rec_node_t *rec_nodes;
tx_t *txn;
unsigned tx_occ, rec_occ, chunk_occ, tx_occ_hi, rec_occ_hi, chunk_occ_hi,
global_nfree_tx, global_nfree_rec, global_nfree_chunk;
struct hdrt_node *hdr_trie[MAX_VSL_TAG];
int nonrecs_wanted[VSL_t__MAX];
struct vbitmap *tag_no_hdr[VSL_t__MAX];
pthread_cond_t spscq_ready_cond;
pthread_mutex_t spscq_ready_lock;
pthread_cond_t data_ready_cond;
pthread_mutex_t data_ready_lock;
struct config config;
struct logconf logconf;
/* static */
......
......@@ -49,6 +49,15 @@
#include "vmb.h"
#include "vtim.h"
/* global variables, see varnishevent.h */
pthread_cond_t spscq_ready_cond;
pthread_mutex_t spscq_ready_lock;
pthread_cond_t data_ready_cond;
pthread_mutex_t data_ready_lock;
/* global variables, see writer.h */
struct txhead_s wrt_freetx;
typedef enum {
WRT_NOTSTARTED = 0,
WRT_INITIALIZING,
......
......@@ -32,6 +32,6 @@
#include "varnishevent.h"
/* local freelist - return space in chunks */
struct txhead_s wrt_freetx;
extern struct txhead_s wrt_freetx;
void wrt_write(tx_t *tx);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment