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
91d192cd
Commit
91d192cd
authored
Feb 19, 2012
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate wrk->sp
parent
ce3ca928
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
25 deletions
+7
-25
cache.h
bin/varnishd/cache/cache.h
+0
-2
cache_acceptor.c
bin/varnishd/cache/cache_acceptor.c
+0
-1
cache_center.c
bin/varnishd/cache/cache_center.c
+0
-8
cache_pool.c
bin/varnishd/cache/cache_pool.c
+0
-1
cache_session.c
bin/varnishd/cache/cache_session.c
+7
-13
No files found.
bin/varnishd/cache/cache.h
View file @
91d192cd
...
...
@@ -310,8 +310,6 @@ struct worker {
pthread_cond_t
cond
;
struct
sess
*
sp
;
struct
VCL_conf
*
vcl
;
struct
vsl_log
vsl
[
1
];
...
...
bin/varnishd/cache/cache_acceptor.c
View file @
91d192cd
...
...
@@ -229,7 +229,6 @@ VCA_FailSess(struct worker *wrk)
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CAST_OBJ_NOTNULL
(
wa
,
(
void
*
)
wrk
->
aws
->
f
,
WRK_ACCEPT_MAGIC
);
AZ
(
wrk
->
sp
);
AZ
(
close
(
wa
->
acceptsock
));
wrk
->
stats
.
sess_drop
++
;
vca_pace_bad
();
...
...
bin/varnishd/cache/cache_center.c
View file @
91d192cd
...
...
@@ -1552,10 +1552,6 @@ CNT_Session(struct sess *sp)
struct
worker
*
wrk
;
CHECK_OBJ_NOTNULL
(
sp
,
SESS_MAGIC
);
#if 0
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
MPL_AssertSane(req);
#endif
wrk
=
sp
->
wrk
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
...
...
@@ -1590,10 +1586,6 @@ CNT_Session(struct sess *sp)
*/
for
(
done
=
0
;
!
done
;
)
{
assert
(
sp
->
wrk
==
wrk
);
#if 0
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
MPL_AssertSane(req);
#endif
/*
* This is a good place to be paranoid about the various
* pointers still pointing to the things we expect.
...
...
bin/varnishd/cache/cache_pool.c
View file @
91d192cd
...
...
@@ -438,7 +438,6 @@ pool_herder(void *priv)
VSC_C_main
->
threads
--
;
VSC_C_main
->
threads_destroyed
++
;
Lck_Unlock
(
&
pool_mtx
);
AZ
(
wrk
->
sp
);
wrk
->
task
.
func
=
NULL
;
wrk
->
task
.
priv
=
NULL
;
AZ
(
pthread_cond_signal
(
&
wrk
->
cond
));
...
...
bin/varnishd/cache/cache_session.c
View file @
91d192cd
...
...
@@ -142,17 +142,11 @@ ses_pool_task(struct worker *wrk, void *arg)
AZ
(
wrk
->
aws
->
r
);
wrk
->
lastused
=
NAN
;
THR_SetSession
(
sp
);
if
(
wrk
->
sp
==
NULL
)
wrk
->
sp
=
sp
;
else
assert
(
wrk
->
sp
==
sp
);
AZ
(
sp
->
wrk
);
sp
->
wrk
=
wrk
;
CNT_Session
(
sp
);
sp
=
NULL
;
/* Cannot access sp now */
sp
=
NULL
;
/* Cannot access sp any longer */
THR_SetSession
(
NULL
);
wrk
->
sp
=
NULL
;
WS_Assert
(
wrk
->
aws
);
AZ
(
wrk
->
busyobj
);
AZ
(
wrk
->
wrw
);
...
...
@@ -171,20 +165,20 @@ void
SES_pool_accept_task
(
struct
worker
*
wrk
,
void
*
arg
)
{
struct
sesspool
*
pp
;
struct
sess
*
sp
;
CHECK_OBJ_NOTNULL
(
wrk
,
WORKER_MAGIC
);
CAST_OBJ_NOTNULL
(
pp
,
arg
,
SESSPOOL_MAGIC
);
/* Turn accepted socket into a session */
AZ
(
wrk
->
sp
);
AN
(
wrk
->
aws
->
r
);
wrk
->
sp
=
ses_new
(
pp
);
if
(
wrk
->
sp
==
NULL
)
{
sp
=
ses_new
(
pp
);
if
(
sp
==
NULL
)
{
VCA_FailSess
(
wrk
);
}
else
{
VCA_SetupSess
(
wrk
,
wrk
->
sp
);
wrk
->
sp
->
step
=
STP_FIRST
;
ses_pool_task
(
wrk
,
wrk
->
sp
);
VCA_SetupSess
(
wrk
,
sp
);
sp
->
step
=
STP_FIRST
;
ses_pool_task
(
wrk
,
sp
);
}
}
...
...
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