- Notifications
You must be signed in to change notification settings - Fork5
Commite7ca867
committed
Try to reduce confusion about what is a lock method identifier, a lock
method control structure, or a table of control structures.. Use type LOCKMASK where an int is not a counter.. Get rid of INVALID_TABLEID, use INVALID_LOCKMETHOD instead.. Use INVALID_LOCKMETHOD instead of (LOCKMETHOD) NULL, because LOCKMETHOD is not a pointer.. Define and use macro LockMethodIsValid.. Rename LOCKMETHOD to LOCKMETHODID.. Remove global variable LongTermTableId in lmgr.c, because it is never used.. Make LockTableId static in lmgr.c, because it is used nowhere else. Why not remove it and use DEFAULT_LOCKMETHOD?. Rename the lock method control structure from LOCKMETHODTABLE to LockMethodData. Introduce a pointer type named LockMethod.. Remove elog(FATAL) after InitLockTable() call in CreateSharedMemoryAndSemaphores(), because if something goes wrong, there is elog(FATAL) in LockMethodTableInit(), and if this doesn't help, an elog(ERROR) in InitLockTable() is promoted to FATAL.. Make InitLockTable() void, because its only caller does not use its return value any more.. Rename variables in lock.c to avoid statements like LockMethodTable[NumLockMethods] = lockMethodTable; lockMethodTable = LockMethodTable[lockmethod];. Change LOCKMETHODID type to uint16 to fit into struct LOCKTAG.. Remove static variables BITS_OFF and BITS_ON from lock.c, because I agree to this doubt: * XXX is a fetch from a static array really faster than a shift?. Define and use macros LOCKBIT_ON/OFF.Manfred Koizar1 parente2ac58c commite7ca867
8 files changed
+153
-181
lines changedLines changed: 2 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
114 |
| - | |
115 |
| - | |
| 114 | + | |
116 | 115 |
| |
117 | 116 |
| |
118 | 117 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
428 | 428 |
| |
429 | 429 |
| |
430 | 430 |
| |
431 |
| - | |
| 431 | + | |
432 | 432 |
| |
433 | 433 |
| |
434 | 434 |
| |
|
Lines changed: 12 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
68 |
| - | |
69 |
| - | |
| 68 | + | |
70 | 69 |
| |
71 | 70 |
| |
72 | 71 |
| |
73 | 72 |
| |
74 |
| - | |
| 73 | + | |
75 | 74 |
| |
76 | 75 |
| |
77 |
| - | |
| 76 | + | |
78 | 77 |
| |
79 | 78 |
| |
80 |
| - | |
81 |
| - | |
82 |
| - | |
83 |
| - | |
84 |
| - | |
85 |
| - | |
86 |
| - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
87 | 84 |
| |
| 85 | + | |
88 | 86 |
| |
89 | 87 |
| |
90 | 88 |
| |
91 | 89 |
| |
92 | 90 |
| |
93 | 91 |
| |
94 | 92 |
| |
95 |
| - | |
| 93 | + | |
96 | 94 |
| |
| 95 | + | |
97 | 96 |
| |
98 |
| - | |
99 |
| - | |
100 | 97 |
| |
101 | 98 |
| |
102 | 99 |
| |
|
0 commit comments
Comments
(0)