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
ef07e1dd
Commit
ef07e1dd
authored
Jun 20, 2011
by
Poul-Henning Kamp
Committed by
Tollef Fog Heen
Aug 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass priv2 member instead of objcore pointer, thats all we need.
parent
24eea3f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
storage_persistent_silo.c
bin/varnishd/storage_persistent_silo.c
+7
-9
No files found.
bin/varnishd/storage_persistent_silo.c
View file @
ef07e1dd
...
...
@@ -308,15 +308,13 @@ smp_close_seg(struct smp_sc *sc, struct smp_seg *sg)
*/
static
struct
smp_object
*
smp_find_so
(
const
struct
smp_seg
*
sg
,
const
struct
objcore
*
oc
)
smp_find_so
(
const
struct
smp_seg
*
sg
,
unsigned
priv2
)
{
struct
smp_object
*
so
;
unsigned
smp_idx
;
smp_idx
=
oc
->
priv2
;
assert
(
smp_idx
>
0
);
assert
(
smp_idx
<=
sg
->
p
.
lobjlist
);
so
=
&
sg
->
objs
[
sg
->
p
.
lobjlist
-
smp_idx
];
assert
(
priv2
>
0
);
assert
(
priv2
<=
sg
->
p
.
lobjlist
);
so
=
&
sg
->
objs
[
sg
->
p
.
lobjlist
-
priv2
];
return
(
so
);
}
...
...
@@ -390,7 +388,7 @@ smp_oc_getobj(struct worker *wrk, struct objcore *oc)
AZ
(
oc
->
flags
&
OC_F_NEEDFIXUP
);
CAST_OBJ_NOTNULL
(
sg
,
oc
->
priv
,
SMP_SEG_MAGIC
);
so
=
smp_find_so
(
sg
,
oc
);
so
=
smp_find_so
(
sg
,
oc
->
priv2
);
o
=
(
void
*
)(
sg
->
sc
->
base
+
so
->
ptr
);
/*
...
...
@@ -456,7 +454,7 @@ smp_oc_updatemeta(struct objcore *oc)
CAST_OBJ_NOTNULL
(
sg
,
oc
->
priv
,
SMP_SEG_MAGIC
);
CHECK_OBJ_NOTNULL
(
sg
->
sc
,
SMP_SC_MAGIC
);
so
=
smp_find_so
(
sg
,
oc
);
so
=
smp_find_so
(
sg
,
oc
->
priv2
);
mttl
=
EXP_Grace
(
NULL
,
o
);
...
...
@@ -481,7 +479,7 @@ smp_oc_freeobj(struct objcore *oc)
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CAST_OBJ_NOTNULL
(
sg
,
oc
->
priv
,
SMP_SEG_MAGIC
);
so
=
smp_find_so
(
sg
,
oc
);
so
=
smp_find_so
(
sg
,
oc
->
priv2
);
Lck_Lock
(
&
sg
->
sc
->
mtx
);
so
->
ttl
=
0
;
...
...
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