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
473e58c0
Commit
473e58c0
authored
Jan 02, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collapse two VTAILQ_ENTRY() in struct sess, saving 16 bytes.
parent
0b1e63e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
cache.h
bin/varnishd/cache/cache.h
+2
-3
cache_pool.c
bin/varnishd/cache/cache_pool.c
+2
-2
No files found.
bin/varnishd/cache/cache.h
View file @
473e58c0
...
...
@@ -636,6 +636,8 @@ struct sess {
struct
worker
*
wrk
;
struct
req
*
req
;
VTAILQ_ENTRY
(
sess
)
list
;
/* Session related fields ------------------------------------*/
int
fd
;
...
...
@@ -651,11 +653,8 @@ struct sess {
char
addr
[
ADDR_BUFSIZE
];
char
port
[
PORT_BUFSIZE
];
VTAILQ_ENTRY
(
sess
)
poollist
;
struct
acct
acct_ses
;
VTAILQ_ENTRY
(
sess
)
list
;
/* Timestamps, all on TIM_real() timescale */
double
t_open
;
/* fd accepted */
double
t_idle
;
/* fd accepted or resp sent */
...
...
bin/varnishd/cache/cache_pool.c
View file @
473e58c0
...
...
@@ -201,7 +201,7 @@ Pool_Work_Thread(void *priv, struct worker *wrk)
if
(
wrk
->
sp
!=
NULL
)
{
/* Process queued requests, if any */
assert
(
pp
->
lqueue
>
0
);
VTAILQ_REMOVE
(
&
pp
->
queue
,
wrk
->
sp
,
pool
list
);
VTAILQ_REMOVE
(
&
pp
->
queue
,
wrk
->
sp
,
list
);
wrk
->
do_what
=
pool_do_sess
;
pp
->
lqueue
--
;
}
else
if
(
!
VTAILQ_EMPTY
(
&
pp
->
socks
))
{
...
...
@@ -314,7 +314,7 @@ pool_queue(struct pool *pp, struct sess *sp)
return
(
-
1
);
}
VTAILQ_INSERT_TAIL
(
&
pp
->
queue
,
sp
,
pool
list
);
VTAILQ_INSERT_TAIL
(
&
pp
->
queue
,
sp
,
list
);
pp
->
nqueued
++
;
pp
->
lqueue
++
;
Lck_Unlock
(
&
pp
->
mtx
);
...
...
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