On Thu, Sep 22, 2022 at 4:50 PM kuroda.hay...@fujitsu.com <kuroda.hay...@fujitsu.com> wrote: > > Hi Amit, > > > > I checked other flags that are set by signal handlers, their datatype > > > seemed to > > be sig_atomic_t. > > > Is there any reasons that you use normal bool? It should be changed if > > > not. > > > > > > > It follows the logic similar to ParallelMessagePending. Do you see any > > problem with it? > > Hmm, one consideration is: > what will happen if the signal handler HandleParallelApplyMessageInterrupt() > is fired during "ParallelApplyMessagePending = false;"? > IIUC sig_atomic_t has been needed to avoid writing to same data at the same > time. >
But we do call HOLD_INTERRUPTS() before we do "ParallelApplyMessagePending = false;", so that should not happen. However, I think it would be better to use sig_atomic_t here for the sake of consistency. I think you can start a separate thread to check if we can change ParallelMessagePending to make it consistent with other such variables. -- With Regards, Amit Kapila.