Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-objvar
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
varnish-objvar
Commits
f1811c6e
Unverified
Commit
f1811c6e
authored
Jan 06, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert pthread_*
parent
a46d462c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
vmod_globalvar.c
src/vmod_globalvar.c
+6
-6
No files found.
src/vmod_globalvar.c
View file @
f1811c6e
...
...
@@ -69,9 +69,9 @@ unref_var(struct vmod_globalvar_var *v)
{
unsigned
r
;
pthread_mutex_lock
(
&
v
->
mtx
);
AZ
(
pthread_mutex_lock
(
&
v
->
mtx
)
);
r
=
--
v
->
refcnt
;
pthread_mutex_unlock
(
&
v
->
mtx
);
AZ
(
pthread_mutex_unlock
(
&
v
->
mtx
)
);
if
(
r
)
return
;
...
...
@@ -88,9 +88,9 @@ ref_var(struct vmod_globalvar_var *v)
{
AN
(
v
->
refcnt
);
// must be alive
pthread_mutex_lock
(
&
v
->
mtx
);
AZ
(
pthread_mutex_lock
(
&
v
->
mtx
)
);
v
->
refcnt
++
;
pthread_mutex_unlock
(
&
v
->
mtx
);
AZ
(
pthread_mutex_unlock
(
&
v
->
mtx
)
);
}
static
void
...
...
@@ -236,11 +236,11 @@ task_ref_var(VRT_CTX, struct vmod_globalvar_var *v, unsigned magic) {
n->free_f = free_var_ ## type; \
CP_ ## TYPE (n->val, val); \
\
pthread_mutex_lock(&v->mtx);
\
AZ(pthread_mutex_lock(&v->mtx));
\
o = v->var; \
v->var = n; \
v->defined = 1; \
pthread_mutex_unlock(&v->mtx);
\
AZ(pthread_mutex_unlock(&v->mtx));
\
if (o) \
unref_var(o); \
} \
...
...
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