Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
bed756a8
Commit
bed756a8
authored
10 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Suppress some unused-variable complaints in new LOCK_DEBUG code.
Jeff Janes
parent
656ea810
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/storage/lmgr/lwlock.c
+6
-5
6 additions, 5 deletions
src/backend/storage/lmgr/lwlock.c
with
6 additions
and
5 deletions
src/backend/storage/lmgr/lwlock.c
+
6
−
5
View file @
bed756a8
...
...
@@ -207,7 +207,8 @@ LOG_LWDEBUG(const char *where, LWLock *lock, const char *msg)
ereport
(
LOG
,
(
errhidestmt
(
true
),
errhidecontext
(
true
),
errmsg
(
"%s(%s %d): %s"
,
where
,
T_NAME
(
lock
),
T_ID
(
lock
),
msg
)));
errmsg
(
"%s(%s %d): %s"
,
where
,
T_NAME
(
lock
),
T_ID
(
lock
),
msg
)));
}
}
...
...
@@ -879,7 +880,7 @@ LWLockDequeueSelf(LWLock *lock)
#ifdef LOCK_DEBUG
{
/* not waiting anymore */
uint32
nwaiters
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
uint32
nwaiters
PG_USED_FOR_ASSERTS_ONLY
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
Assert
(
nwaiters
<
MAX_BACKENDS
);
}
#endif
...
...
@@ -1045,7 +1046,7 @@ LWLockAcquireCommon(LWLock *lock, LWLockMode mode, uint64 *valptr, uint64 val)
#ifdef LOCK_DEBUG
{
/* not waiting anymore */
uint32
nwaiters
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
uint32
nwaiters
PG_USED_FOR_ASSERTS_ONLY
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
Assert
(
nwaiters
<
MAX_BACKENDS
);
}
#endif
...
...
@@ -1202,7 +1203,7 @@ LWLockAcquireOrWait(LWLock *lock, LWLockMode mode)
#ifdef LOCK_DEBUG
{
/* not waiting anymore */
uint32
nwaiters
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
uint32
nwaiters
PG_USED_FOR_ASSERTS_ONLY
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
Assert
(
nwaiters
<
MAX_BACKENDS
);
}
#endif
...
...
@@ -1403,7 +1404,7 @@ LWLockWaitForVar(LWLock *lock, uint64 *valptr, uint64 oldval, uint64 *newval)
#ifdef LOCK_DEBUG
{
/* not waiting anymore */
uint32
nwaiters
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
uint32
nwaiters
PG_USED_FOR_ASSERTS_ONLY
=
pg_atomic_fetch_sub_u32
(
&
lock
->
nwaiters
,
1
);
Assert
(
nwaiters
<
MAX_BACKENDS
);
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment