Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
unique-xids
Commits
919696b0
Commit
919696b0
authored
Nov 16, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More include file cleanup
parent
ceaf73d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
cache.h
bin/varnishd/cache/cache.h
+3
-9
common.h
bin/varnishd/common/common.h
+15
-8
No files found.
bin/varnishd/cache/cache.h
View file @
919696b0
...
...
@@ -114,15 +114,6 @@ struct worker;
#define DIGEST_LEN 32
/*--------------------------------------------------------------------
* Pointer aligment magic
*/
#define PALGN (sizeof(void *) - 1)
#define PAOK(p) (((uintptr_t)(p) & PALGN) == 0)
#define PRNDDN(p) ((uintptr_t)(p) & ~PALGN)
#define PRNDUP(p) (((uintptr_t)(p) + PALGN) & ~PALGN)
/*--------------------------------------------------------------------*/
typedef
struct
{
...
...
@@ -138,6 +129,9 @@ enum step {
#undef STEP
};
/*--------------------------------------------------------------------*/
struct
lock
{
void
*
priv
;
};
// Opaque
/*--------------------------------------------------------------------
* Workspace structure for quick memory allocation.
*/
...
...
bin/varnishd/common/common.h
View file @
919696b0
...
...
@@ -55,13 +55,9 @@ extern char *PAN_panicstr;
extern
unsigned
PAN_panicstr_len
;
/* varnishd.c */
struct
vsb
;
extern
struct
vsb
*
vident
;
extern
struct
vsb
*
vident
;
// XXX: -> heritage ?
int
Symbol_Lookup
(
struct
vsb
*
vsb
,
void
*
ptr
);
#define TRUST_ME(ptr) ((void*)(uintptr_t)(ptr))
/* Help shut up FlexeLint */
#define __match_proto__(xxx)
/*lint -e{818} */
...
...
@@ -97,9 +93,6 @@ void VSM__Clean(void);
#define VSM_CLASS_MARK "MgrCld"
#define VSM_COOL_TIME 5
/* cache_lck.c */
struct
lock
{
void
*
priv
;
};
// Opaque
/*---------------------------------------------------------------------
* Generic power-2 rounding macros
*/
...
...
@@ -107,3 +100,17 @@ struct lock { void *priv; }; // Opaque
#define PWR2(x) ((((x)-1)&(x))==0)
/* Is a power of two */
#define RDN2(x, y) ((x)&(~((y)-1)))
/* if y is powers of two */
#define RUP2(x, y) (((x)+((y)-1))&(~((y)-1)))
/* if y is powers of two */
/*--------------------------------------------------------------------
* Pointer aligment magic
*/
#define PALGN (sizeof(void *) - 1)
/* size of alignment */
#define PAOK(p) (((uintptr_t)(p) & PALGN) == 0)
/* is aligned */
#define PRNDDN(p) ((uintptr_t)(p) & ~PALGN)
/* Round down */
#define PRNDUP(p) (((uintptr_t)(p) + PALGN) & ~PALGN)
/* Round up */
/*--------------------------------------------------------------------
* To be used as little as possible to wash off const/volatile etc.
*/
#define TRUST_ME(ptr) ((void*)(uintptr_t)(ptr))
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