Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc17164a

Browse files
committed
Simplify some conditions related to [LW]Lock in generate-wait_event_types.pl
The first check on the enum values was not necessary as the values setin wait_event_names.txt for the classes LWLock and Lock were able tosatisfy the check. The second check when generating the C and headerfiles is now based on a match of the class names, making it simpler tounderstand.Author: Masahiro Ikeda, Michael PaquierDiscussion:https://postgr.es/m/eaf82a85c0ef1b55dc3b651d3f7b867a@oss.nttdata.com
1 parent7a7f13a commitc17164a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

‎src/backend/utils/activity/generate-wait_event_types.pl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,8 @@
8585
my$trimmedwaiteventname =$waiteventenumname;
8686
$trimmedwaiteventname =~s/^WAIT_EVENT_//;
8787

88-
# An exception is required for LWLock and Lock as these don't require
89-
# any C and header files generated.
9088
die"wait event names must start with 'WAIT_EVENT_'"
91-
if ($trimmedwaiteventnameeq$waiteventenumname
92-
&&$waiteventenumname !~/^LWLock/
93-
&&$waiteventenumname !~/^Lock/);
94-
$continue =",\n";
89+
if ($trimmedwaiteventnameeq$waiteventenumname);
9590
push(@{$hashwe{$waitclassname} },@waiteventlist);
9691
}
9792

@@ -141,8 +136,8 @@
141136
# Don't generate .c and .h files for LWLock and Lock, these are
142137
# handled independently.
143138
next
144-
if ($waitclass=~/^WaitEventLWLock$/
145-
||$waitclass=~/^WaitEventLock$/);
139+
if ($waitclasseq'WaitEventLWLock'
140+
||$waitclasseq'WaitEventLock');
146141

147142
my$last =$waitclass;
148143
$last =~s/^WaitEvent//;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp