Re: Should we standardize on a type for signal handler flags?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Should we standardize on a type for signal handler flags?
Date: 2017-06-06 18:36:35
Message-ID: CA+TgmobnBP4QbJe+o7QGW=TsRsatqhEKV6B-FVNw0p6agySYkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 6, 2017 at 2:24 PM, Andres Freund <andres(at)anarazel(dot)de> 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 int4 is safe - otherwise we'd have crashed and burned a long time ago
> - but that that might be different for *smaller* datatypes because
> $platform doesn't really do smaller writes atomically (turning them into
> read-or-write operations either in microcode or assembly).

Oh, right, I remember hearing about that issue before, but it had
slipped my mind completely.

> Alpha,
> s390, pa-risc appear to have such behaviour cross-cpu - although that
> doesn't necessarily imply the same is true for handlers as well.

Hmm, OK. We've already decided Alpha is safely dead, but s390 and
pa-risc are ostensibly not dead.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-06-06 18:41:06 Re: Should we standardize on a type for signal handler flags?
Previous Message Robert Haas 2017-06-06 18:24:42 Re: UPDATE of partition key