[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gmake in Solaris 11.4: TFR missing
From: |
Peter Maydell |
Subject: |
Re: gmake in Solaris 11.4: TFR missing |
Date: |
Sat, 4 Jul 2020 14:52:22 +0100 |
On Sat, 4 Jul 2020 at 12:30, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Any idea what means TFR? I understand it keeps retrying while
> interrupted, but can't find the origin of that abbreviation.
Probably it stands for "temporary failure retry" -- glibc provides
essentially the same primitive in unistd.h as TEMP_FAILURE_RETRY:
https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html
TFR is pretty old as QEMU code goes: added in commit aeb30be60a92148e38d
in 2007.
> I'm not sure what we gain by using this macro, it seems dangerous
> as there is no guaranty we 'expr' is a single libc call updating
> errno.
Well, the design of the macro is that it is for use to wrap
expressions which are a single thing that update errno...
The gain overall is that "we need to retry practically everything
to handle EINTR" results in lots of awkward open-coded loops,
and in theory putting them behind macros makes the normal-case
handling more obvious. But this only works if the codebase is
going to consistently adopt TFR() as its EINTR-handling strategy.
(EINTR is one of the big failures of the Unix/POSIX API, in my view.)
thanks
-- PMM
- Re: [PATCH] configure / util: Auto-detect the availability of openpty(), (continued)
- Re: [PATCH] configure / util: Auto-detect the availability of openpty(), Michele Denber, 2020/07/02
- Re: [PATCH] configure / util: Auto-detect the availability of openpty(), Thomas Huth, 2020/07/03
- Re: [PATCH] configure / util: Auto-detect the availability of openpty(), Michele Denber, 2020/07/03
- Re: [PATCH] configure / util: Auto-detect the availability of openpty(), Michele Denber, 2020/07/03
- Re: [PATCH] configure / util: Auto-detect the availability of openpty(), Peter Maydell, 2020/07/03
- gmake in Solaris 11.4: _IOR missing, Michele Denber, 2020/07/03
- gmake in Solaris 11.4: TFR missing, Michele Denber, 2020/07/03
- Re: gmake in Solaris 11.4: TFR missing, Philippe Mathieu-Daudé, 2020/07/03
- Re: gmake in Solaris 11.4: TFR missing, Peter Maydell, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing, Philippe Mathieu-Daudé, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing,
Peter Maydell <=
- Re: gmake in Solaris 11.4: TFR missing, Michele Denber, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing, Thomas Huth, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing, Michele Denber, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing, Philippe Mathieu-Daudé, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing, Michele Denber, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing, Peter Maydell, 2020/07/04
- Re: gmake in Solaris 11.4: TFR missing, Michele Denber, 2020/07/04