@@ -225,7 +225,7 @@ InitializeLatchSupport(void)
225
225
* Initialize a process-local latch.
226
226
*/
227
227
void
228
- InitLatch (volatile Latch * latch )
228
+ InitLatch (Latch * latch )
229
229
{
230
230
latch -> is_set = false;
231
231
latch -> owner_pid = MyProcPid ;
@@ -257,7 +257,7 @@ InitLatch(volatile Latch *latch)
257
257
* process references to postmaster-private latches or WaitEventSets.
258
258
*/
259
259
void
260
- InitSharedLatch (volatile Latch * latch )
260
+ InitSharedLatch (Latch * latch )
261
261
{
262
262
#ifdef WIN32
263
263
SECURITY_ATTRIBUTES sa ;
@@ -293,7 +293,7 @@ InitSharedLatch(volatile Latch *latch)
293
293
* as shared latches use SIGUSR1 for inter-process communication.
294
294
*/
295
295
void
296
- OwnLatch (volatile Latch * latch )
296
+ OwnLatch (Latch * latch )
297
297
{
298
298
/* Sanity checks */
299
299
Assert (latch -> is_shared );
@@ -313,7 +313,7 @@ OwnLatch(volatile Latch *latch)
313
313
* Disown a shared latch currently owned by the current process.
314
314
*/
315
315
void
316
- DisownLatch (volatile Latch * latch )
316
+ DisownLatch (Latch * latch )
317
317
{
318
318
Assert (latch -> is_shared );
319
319
Assert (latch -> owner_pid == MyProcPid );
@@ -341,7 +341,7 @@ DisownLatch(volatile Latch *latch)
341
341
* we return all of them in one call, but we will return at least one.
342
342
*/
343
343
int
344
- WaitLatch (volatile Latch * latch , int wakeEvents , long timeout ,
344
+ WaitLatch (Latch * latch , int wakeEvents , long timeout ,
345
345
uint32 wait_event_info )
346
346
{
347
347
return WaitLatchOrSocket (latch , wakeEvents , PGINVALID_SOCKET , timeout ,
@@ -366,7 +366,7 @@ WaitLatch(volatile Latch *latch, int wakeEvents, long timeout,
366
366
* WaitEventSet instead; that's more efficient.
367
367
*/
368
368
int
369
- WaitLatchOrSocket (volatile Latch * latch , int wakeEvents , pgsocket sock ,
369
+ WaitLatchOrSocket (Latch * latch , int wakeEvents , pgsocket sock ,
370
370
long timeout , uint32 wait_event_info )
371
371
{
372
372
int ret = 0 ;
@@ -381,7 +381,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,
381
381
382
382
if (wakeEvents & WL_LATCH_SET )
383
383
AddWaitEventToSet (set , WL_LATCH_SET , PGINVALID_SOCKET ,
384
- ( Latch * ) latch , NULL );
384
+ latch , NULL );
385
385
386
386
/* Postmaster-managed callers must handle postmaster death somehow. */
387
387
Assert (!IsUnderPostmaster ||
@@ -433,7 +433,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,
433
433
* throwing an error is not a good idea.
434
434
*/
435
435
void
436
- SetLatch (volatile Latch * latch )
436
+ SetLatch (Latch * latch )
437
437
{
438
438
#ifndef WIN32
439
439
pid_t owner_pid ;
@@ -516,7 +516,7 @@ SetLatch(volatile Latch *latch)
516
516
* the latch is set again before the WaitLatch call.
517
517
*/
518
518
void
519
- ResetLatch (volatile Latch * latch )
519
+ ResetLatch (Latch * latch )
520
520
{
521
521
/* Only the owner should reset the latch */
522
522
Assert (latch -> owner_pid == MyProcPid );
0 commit comments