@@ -225,7 +225,7 @@ InitializeLatchSupport(void)
225225 * Initialize a process-local latch.
226226 */
227227void
228- InitLatch (volatile Latch * latch )
228+ InitLatch (Latch * latch )
229229{
230230 latch -> is_set = false;
231231 latch -> owner_pid = MyProcPid ;
@@ -257,7 +257,7 @@ InitLatch(volatile Latch *latch)
257257 * process references to postmaster-private latches or WaitEventSets.
258258 */
259259void
260- InitSharedLatch (volatile Latch * latch )
260+ InitSharedLatch (Latch * latch )
261261{
262262#ifdef WIN32
263263 SECURITY_ATTRIBUTES sa ;
@@ -293,7 +293,7 @@ InitSharedLatch(volatile Latch *latch)
293293 * as shared latches use SIGUSR1 for inter-process communication.
294294 */
295295void
296- OwnLatch (volatile Latch * latch )
296+ OwnLatch (Latch * latch )
297297{
298298 /* Sanity checks */
299299 Assert (latch -> is_shared );
@@ -313,7 +313,7 @@ OwnLatch(volatile Latch *latch)
313313 * Disown a shared latch currently owned by the current process.
314314 */
315315void
316- DisownLatch (volatile Latch * latch )
316+ DisownLatch (Latch * latch )
317317{
318318 Assert (latch -> is_shared );
319319 Assert (latch -> owner_pid == MyProcPid );
@@ -341,7 +341,7 @@ DisownLatch(volatile Latch *latch)
341341 * we return all of them in one call, but we will return at least one.
342342 */
343343int
344- WaitLatch (volatile Latch * latch , int wakeEvents , long timeout ,
344+ WaitLatch (Latch * latch , int wakeEvents , long timeout ,
345345 uint32 wait_event_info )
346346{
347347 return WaitLatchOrSocket (latch , wakeEvents , PGINVALID_SOCKET , timeout ,
@@ -366,7 +366,7 @@ WaitLatch(volatile Latch *latch, int wakeEvents, long timeout,
366366 * WaitEventSet instead; that's more efficient.
367367 */
368368int
369- WaitLatchOrSocket (volatile Latch * latch , int wakeEvents , pgsocket sock ,
369+ WaitLatchOrSocket (Latch * latch , int wakeEvents , pgsocket sock ,
370370 long timeout , uint32 wait_event_info )
371371{
372372 int ret = 0 ;
@@ -381,7 +381,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,
381381
382382 if (wakeEvents & WL_LATCH_SET )
383383 AddWaitEventToSet (set , WL_LATCH_SET , PGINVALID_SOCKET ,
384- ( Latch * ) latch , NULL );
384+ latch , NULL );
385385
386386 /* Postmaster-managed callers must handle postmaster death somehow. */
387387 Assert (!IsUnderPostmaster ||
@@ -433,7 +433,7 @@ WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,
433433 * throwing an error is not a good idea.
434434 */
435435void
436- SetLatch (volatile Latch * latch )
436+ SetLatch (Latch * latch )
437437{
438438#ifndef WIN32
439439 pid_t owner_pid ;
@@ -516,7 +516,7 @@ SetLatch(volatile Latch *latch)
516516 * the latch is set again before the WaitLatch call.
517517 */
518518void
519- ResetLatch (volatile Latch * latch )
519+ ResetLatch (Latch * latch )
520520{
521521 /* Only the owner should reset the latch */
522522 Assert (latch -> owner_pid == MyProcPid );
0 commit comments