Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
d7dc0556
Unverified
Commit
d7dc0556
authored
Oct 12, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix multiple definition of global variables
parent
5b00968b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
22 deletions
+51
-22
varnishevent.c
src/varnishevent.c
+26
-0
varnishevent.h
src/varnishevent.h
+25
-22
No files found.
src/varnishevent.c
View file @
d7dc0556
...
...
@@ -87,6 +87,32 @@
#define MAX_IDLE_PAUSE 0.01
/* 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 */
const
char
*
version
=
PACKAGE_TARNAME
"-"
PACKAGE_VERSION
" revision "
\
VCS_Version
" branch "
VCS_Branch
;
...
...
src/varnishevent.h
View file @
d7dc0556
...
...
@@ -77,10 +77,10 @@
#define thread_setname(thr,name) do { (void)(thr); (void)(name); } while(0)
#endif
struct
sigaction
default_action
;
extern
struct
sigaction
default_action
;
int
tag2idx
[
MAX_VSL_TAG
];
int
max_idx
;
extern
int
tag2idx
[
MAX_VSL_TAG
];
extern
int
max_idx
;
typedef
struct
chunk_t
{
unsigned
magic
;
...
...
@@ -93,8 +93,8 @@ typedef struct chunk_t {
typedef
VSTAILQ_HEAD
(
chunkhead_s
,
chunk_t
)
chunkhead_t
;
chunk_t
*
chunks
;
unsigned
nchunks
;
extern
chunk_t
*
chunks
;
extern
unsigned
nchunks
;
typedef
struct
rec_t
{
unsigned
magic
;
...
...
@@ -106,8 +106,8 @@ typedef struct rec_t {
VSTAILQ_ENTRY
(
rec_t
)
freelist
;
}
rec_t
;
rec_t
*
records
;
unsigned
nrecords
;
extern
rec_t
*
records
;
extern
unsigned
nrecords
;
typedef
VSTAILQ_HEAD
(
rechead_s
,
rec_t
)
rechead_t
;
...
...
@@ -118,7 +118,7 @@ typedef struct rec_node_t {
rec_t
**
hdrs
;
}
rec_node_t
;
rec_node_t
*
rec_nodes
;
extern
rec_node_t
*
rec_nodes
;
enum
tx_state_e
{
TX_FREE
,
...
...
@@ -152,31 +152,31 @@ typedef struct tx_t {
VSTAILQ_ENTRY
(
tx_t
)
spscq
;
}
tx_t
;
tx_t
*
txn
;
extern
tx_t
*
txn
;
typedef
VSTAILQ_HEAD
(
txhead_s
,
tx_t
)
txhead_t
;
#define OCCUPIED(p) ((p)->occupied == 1)
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
;
extern
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
];
extern
struct
hdrt_node
*
hdr_trie
[
MAX_VSL_TAG
];
/* non-zero if vxid or pvxid outputs are requested for a transaction type */
int
nonrecs_wanted
[
VSL_t__MAX
];
extern
int
nonrecs_wanted
[
VSL_t__MAX
];
struct
vbitmap
*
tag_no_hdr
[
VSL_t__MAX
];
extern
struct
vbitmap
*
tag_no_hdr
[
VSL_t__MAX
];
/* Writer (consumer) waits for this condition when the SPSC queue is empty.
Reader (producer) signals the condition after enqueue. */
pthread_cond_t
spscq_ready_cond
;
pthread_mutex_t
spscq_ready_lock
;
extern
pthread_cond_t
spscq_ready_cond
;
extern
pthread_mutex_t
spscq_ready_lock
;
/* Reader waits for this condition if any of the freelists are exhausted.
Writer signals the condition when it returns freelists. */
pthread_cond_t
data_ready_cond
;
pthread_mutex_t
data_ready_lock
;
extern
pthread_cond_t
data_ready_cond
;
extern
pthread_mutex_t
data_ready_lock
;
struct
config
{
char
log_file
[
PATH_MAX
+
1
];
...
...
@@ -206,7 +206,9 @@ struct config {
unsigned
max_data
;
size_t
output_bufsiz
;
}
config
;
};
extern
struct
config
config
;
/* varnishevent.c */
void
RDR_Stats
(
void
);
...
...
@@ -231,7 +233,8 @@ struct logconf {
log_close_t
*
close
;
FILE
*
out
;
int
level
;
}
logconf
;
};
extern
struct
logconf
logconf
;
int
LOG_Open
(
const
char
*
progname
);
/* XXX: __VA_ARGS__ can't be empty ... */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment