1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/lib/Support/Unix
Pavel Labath ea9cf22c60 [Support] Add RetryAfterSignal helper function
Summary:
This function retries an operation if it was interrupted by a signal
(failed with EINTR). It's inspired by the TEMP_FAILURE_RETRY macro in
glibc, but I've turned that into a template function. I've also added a
fail-value argument, to enable the function to be used with e.g.
fopen(3), which is documented to fail for any reason that open(2) can
fail (which includes EINTR).

The main user of this function will be lldb, but there were also a
couple of uses within llvm that I could simplify using this function.

Reviewers: zturner, silvas, joerg

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D33895

llvm-svn: 305892
2017-06-21 10:55:34 +00:00
..
COM.inc
DynamicLibrary.inc Close DynamicLibraries in reverse order they were opened. 2017-06-05 16:26:58 +00:00
Host.inc [CMake] Introduce LLVM_TARGET_TRIPLE_ENV as an option to override LLVM_DEFAULT_TARGET_TRIPLE at runtime. 2017-06-17 03:19:08 +00:00
Memory.inc Implement AllocateRWX and ReleaseRWX for NetBSD 2017-06-18 16:52:32 +00:00
Mutex.inc
Path.inc [Support] Add RetryAfterSignal helper function 2017-06-21 10:55:34 +00:00
Process.inc [Support] Add RetryAfterSignal helper function 2017-06-21 10:55:34 +00:00
Program.inc Support: chunk writing on Linux 2017-06-20 20:51:51 +00:00
README.txt
RWMutex.inc
Signals.inc Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Threading.inc Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ThreadLocal.inc
Unix.h
Watchdog.inc

llvm/lib/Support/Unix README
===========================

This directory provides implementations of the lib/System classes that
are common to two or more variants of UNIX. For example, the directory
structure underneath this directory could look like this:

Unix           - only code that is truly generic to all UNIX platforms
  Posix        - code that is specific to Posix variants of UNIX
  SUS          - code that is specific to the Single Unix Specification
  SysV         - code that is specific to System V variants of UNIX

As a rule, only those directories actually needing to be created should be
created. Also, further subdirectories could be created to reflect versions of
the various standards. For example, under SUS there could be v1, v2, and v3
subdirectories to reflect the three major versions of SUS.