Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
519f3839
Commit
519f3839
authored
Sep 27, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't have two copies of the param->bitmap magic
parent
75f057cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
26 deletions
+17
-26
cache.h
bin/varnishd/cache/cache.h
+2
-13
common_param.h
bin/varnishd/common/common_param.h
+13
-0
mgt.h
bin/varnishd/mgt/mgt.h
+2
-13
No files found.
bin/varnishd/cache/cache.h
View file @
519f3839
...
...
@@ -1062,19 +1062,8 @@ Tlen(const txt t)
*/
#define W_TIM_real(w) ((w)->lastused = VTIM_real())
static
inline
int
FEATURE
(
enum
feature_bits
x
)
{
return
(
cache_param
->
feature_bits
[(
unsigned
)
x
>>
3
]
&
(
0x80U
>>
((
unsigned
)
x
&
7
)));
}
static
inline
int
DO_DEBUG
(
enum
debug_bits
x
)
{
return
(
cache_param
->
debug_bits
[(
unsigned
)
x
>>
3
]
&
(
0x80U
>>
((
unsigned
)
x
&
7
)));
}
#define FEATURE(x) COM_FEATURE(cache_param->feature_bits, x)
#define DO_DEBUG(x) COM_DO_DEBUG(cache_param->debug_bits, x)
#define DSL(debug_bit, id, ...) \
do { \
...
...
bin/varnishd/common/common_param.h
View file @
519f3839
...
...
@@ -44,12 +44,25 @@ enum debug_bits {
DBG_Reserved
};
static
inline
int
COM_DO_DEBUG
(
uint8_t
volatile
*
p
,
enum
debug_bits
x
)
{
return
(
p
[(
unsigned
)
x
>>
3
]
&
(
0x80U
>>
((
unsigned
)
x
&
7
)));
}
enum
feature_bits
{
#define FEATURE_BIT(U, l, d, ld) FEATURE_##U,
#include "tbl/feature_bits.h"
FEATURE_Reserved
};
static
inline
int
COM_FEATURE
(
uint8_t
volatile
*
p
,
enum
feature_bits
x
)
{
return
(
p
[(
unsigned
)
x
>>
3
]
&
(
0x80U
>>
((
unsigned
)
x
&
7
)));
}
struct
poolparam
{
unsigned
min_pool
;
unsigned
max_pool
;
...
...
bin/varnishd/mgt/mgt.h
View file @
519f3839
...
...
@@ -226,16 +226,5 @@ extern unsigned mgt_vcc_unsafe_path;
#error "Keep pthreads out of in manager process"
#endif
static
inline
int
MGT_FEATURE
(
enum
feature_bits
x
)
{
return
(
mgt_param
.
feature_bits
[(
unsigned
)
x
>>
3
]
&
(
0x80U
>>
((
unsigned
)
x
&
7
)));
}
static
inline
int
MGT_DO_DEBUG
(
enum
debug_bits
x
)
{
return
(
mgt_param
.
debug_bits
[(
unsigned
)
x
>>
3
]
&
(
0x80U
>>
((
unsigned
)
x
&
7
)));
}
#define MGT_FEATURE(x) COM_FEATURE(mgt_param.feature_bits, x)
#define MGT_DO_DEBUG(x) COM_DO_DEBUG(mgt_param.feature_bits, x)
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