On 2017-06-06 14:45:37 -0400, Tom Lane wrote:
> Andres Freund writes:
> > A reasonable rule would actually be to only use [u]int32 and
> > sig_atomic_t, never bool.
>
> Yes, I'd agree with that.
Cool. I propose we change, once branched, the existing code using
booleans, and
Andres Freund writes:
> A reasonable rule would actually be to only use [u]int32 and
> sig_atomic_t, never bool.
Yes, I'd agree with that.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to
Robert Haas writes:
> On Tue, Jun 6, 2017 at 1:33 PM, Tom Lane wrote:
>> That's an argument from false premises. The question here is what types
>> are safe for an interrupt handler to *change*, not what can it read.
> OK, but we certainly have code
On Tue, Jun 6, 2017 at 2:24 PM, Andres Freund wrote:
> Don't think it's actually clear that errno is an integer - might very
> well be just a sig_atomic_t, which can contain values up to like 127 or
> so. I think the bigger point Tom was making is that we actually know
> an
On 2017-06-06 14:13:29 -0400, Robert Haas wrote:
> On Tue, Jun 6, 2017 at 1:33 PM, Tom Lane wrote:
> >> I think that's a pretty good argument, really. If there exists a
> >> platform where only sig_atomic_t is safe to read from a signal
> >> handler, then we already don't
On Tue, Jun 6, 2017 at 1:33 PM, Tom Lane wrote:
>> I think that's a pretty good argument, really. If there exists a
>> platform where only sig_atomic_t is safe to read from a signal
>> handler, then we already don't work on that platform. Even saving and
>> restoring errno
Robert Haas writes:
> On Sun, Jun 4, 2017 at 7:21 PM, Andres Freund wrote:
>> Well, we already have some variables that aren't actually booleans,
>> although I think all of them are only read not manipulated in signal
>> handlers (InterruptHoldoffCount
On 2017-06-06 13:07:57 -0400, Robert Haas wrote:
> > We also already rely on int32 stores being atomic in other
> > parts of the code, although that's between processes not between signal
> > / normal path of execution.
>
> I don't think the issues are much different. Presumably no CPU
>
On Sun, Jun 4, 2017 at 7:21 PM, Andres Freund wrote:
> Well, we already have some variables that aren't actually booleans,
> although I think all of them are only read not manipulated in signal
> handlers (InterruptHoldoffCount etc). So one could argue that there's
> no
Andres Freund writes:
> On 2017-06-04 19:14:06 -0400, Tom Lane wrote:
>> sig_atomic_t is more standards-conforming, I should think. I'm not sure
>> if there are any current platforms where a store to a char variable
>> wouldn't be atomic, but why live dangerously?
> Well, we
On 2017-06-04 19:14:06 -0400, Tom Lane wrote:
> Andres Freund writes:
> > At the moment a number of flag variables set in signal handlers have
> > 'volatile bool' as type, others have 'volatile sig_atomic_t'. That's
> > kinda confusing. I think either is safe, but I think
Andres Freund writes:
> At the moment a number of flag variables set in signal handlers have
> 'volatile bool' as type, others have 'volatile sig_atomic_t'. That's
> kinda confusing. I think either is safe, but I think we should
> standardize one of them.
sig_atomic_t is
On Mon, Jun 5, 2017 at 8:00 AM, Andres Freund wrote:
> At the moment a number of flag variables set in signal handlers have
> 'volatile bool' as type, others have 'volatile sig_atomic_t'. That's
> kinda confusing. I think either is safe, but I think we should
> standardize
13 matches
Mail list logo