1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib
David Majnemer a2fe666876 Support: Don't call close again if we get EINTR
Most Unix-like operating systems guarantee that the file descriptor is
closed after a call to close(2), even if close comes back with EINTR.
For these systems, calling close _again_ will either do nothing or close
some other file descriptor open(2)'d by another thread. (Linux)

However, some operating systems do not have this behavior.  They require
at least another call to close(2) before guaranteeing that the
descriptor is closed. (HP-UX)

And some operating systems have an unpredictable blend of the two
behaviors! (xnu)

Avoid this disaster by blocking all signals before we call close(2).
This ensures that a signal will not be delivered to the thread and
close(2) will not give us back EINTR.  We restore the signal mask once
the operation is done.

N.B. This isn't a problem on Windows, it doesn't have a notion of EINTR
because signals always get delivered to dedicated signal handling
threads.

llvm-svn: 219189
2014-10-07 05:48:40 +00:00
..
Analysis [BasicAA] Revert "Revert r218714 - Make better use of zext and sign information." 2014-10-06 18:37:59 +00:00
AsmParser Make CallingConv::ID an alias of "unsigned". 2014-09-10 18:00:17 +00:00
Bitcode Do not destroy external linkage when deleting function body 2014-09-23 12:54:19 +00:00
CodeGen [DAGCombine] Remove SIGN_EXTEND-related inf-loop 2014-10-06 20:19:47 +00:00
DebugInfo Refactor RelocVisitor to take an object. This removes some 2014-10-06 06:55:55 +00:00
ExecutionEngine [MCJIT] Don't crash in debugging output for sections that aren't emitted. 2014-10-01 21:57:47 +00:00
IR [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
IRReader Pass a && to getLazyBitcodeModule. 2014-09-03 17:31:46 +00:00
LineEditor
Linker Merge alignment of common GlobalValue. 2014-09-09 17:48:18 +00:00
LTO LTO: Document the Boolean argument from r218784 2014-10-02 21:11:04 +00:00
MC MachObjectWriter: optimize the string table for common suffices 2014-10-06 17:05:19 +00:00
Object llvm-readobj: print out the fields of the COFF delay-import table 2014-10-03 18:07:18 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData Eliminate some deep std::vector copies. NFC. 2014-10-03 18:33:16 +00:00
Support Support: Don't call close again if we get EINTR 2014-10-07 05:48:40 +00:00
TableGen Eliminate some deep std::vector copies. NFC. 2014-10-03 18:33:16 +00:00
Target [FastISel][AArch64] Teach the address computation code to also fold sign-/zero-extends. 2014-10-07 03:40:06 +00:00
Transforms [InstCombine] re-commit r218721 icmp-select-icmp optimization 2014-10-07 00:16:12 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile