aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation without pthreads.Owen Anderson2009-06-261-3/+3
| | | | | | | Patch by Xerxes Ranby. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74283 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix unused variable warnings.Daniel Dunbar2009-06-261-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74250 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix error in the Win32 implementation pointed out by Howard Su.Owen Anderson2009-06-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74248 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for const thread locals.Owen Anderson2009-06-252-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74226 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in assertion.Owen Anderson2009-06-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74225 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a configure test for pthread_getspecific, and use it when building ↵Owen Anderson2009-06-251-1/+1
| | | | | | ThreadLocal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74222 91177308-0d34-0410-b5e6-96231b3b80d8
* Update cmake build files.Owen Anderson2009-06-251-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74210 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a class for supporting platform independent thread-local storage.Owen Anderson2009-06-253-0/+151
| | | | | | | Windows people, please double-check/patch this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74209 91177308-0d34-0410-b5e6-96231b3b80d8
* Guard dynamic library loading.Owen Anderson2009-06-252-13/+36
| | | | | | | | I did my best at implementing this for Win32, but I don't have a way to test it. Can someone with access to a Win32 machine test/fix this? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74188 91177308-0d34-0410-b5e6-96231b3b80d8
* Add atomic multiply and divide operations, built on top of CompareAndSwap.Owen Anderson2009-06-231-0/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74004 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my last series of commits related to Timer and 64-bit atomics. Not ↵Owen Anderson2009-06-231-19/+7
| | | | | | | | | all the targets we care about are capable of supporting it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73993 91177308-0d34-0410-b5e6-96231b3b80d8
* Atomic ops that do arithmetic use signed arithmetic.Owen Anderson2009-06-231-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73980 91177308-0d34-0410-b5e6-96231b3b80d8
* Label the existing atomic functions as 32-bit specific, and add a 64-bit one ↵Owen Anderson2009-06-231-7/+19
| | | | | | | | | that will be useful in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73971 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an atomic add operation.Owen Anderson2009-06-231-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73964 91177308-0d34-0410-b5e6-96231b3b80d8
* Workaround for an... interesting bug in Darwin's pthread_rwlock_init.Owen Anderson2009-06-201-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73806 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix bad paste-o in the MSVC atomics.Owen Anderson2009-06-191-2/+2
| | | | | | | Patch by Иван Сорокин. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73779 91177308-0d34-0410-b5e6-96231b3b80d8
* Give RWMutex the SmartRWMutex treatment too.Owen Anderson2009-06-183-24/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73710 91177308-0d34-0410-b5e6-96231b3b80d8
* Insert a SmartMutex templated class into the class hierarchy, which takes a ↵Owen Anderson2009-06-183-20/+20
| | | | | | | | | template parameter specifying whether this mutex should become a no-op when not running in multithreaded mode. Make sys::Mutex a typedef of SmartMutex<false>, to preserve source compatibility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73709 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake files to account for new location of Threading.cpp.Ted Kremenek2009-06-181-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73708 91177308-0d34-0410-b5e6-96231b3b80d8
* Move Threading.[h|cpp] from Support to System.Owen Anderson2009-06-181-0/+63
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73707 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build when disable thread support.Owen Anderson2009-06-181-1/+1
| | | | | | | Patch by Howard Su. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73680 91177308-0d34-0410-b5e6-96231b3b80d8
* Add RWMutex.cpp to the CMake makefilesDouglas Gregor2009-06-171-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73615 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the Win32 reader-writer lock implementation by making it just a normalOwen Anderson2009-06-171-6/+14
| | | | | | | | | | lock. This is obviously bad, but at least it's threadsafe! If you know how to improve this in a pre-Vista friendly well, patches welcome! Patch by Max Burke. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73607 91177308-0d34-0410-b5e6-96231b3b80d8
* Use atomic increment/decrement for reference counting of Type's.Owen Anderson2009-06-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73588 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an atomic increment and decrement implementation, which will be used forOwen Anderson2009-06-171-0/+28
| | | | | | | thread-safe reference counting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73587 91177308-0d34-0410-b5e6-96231b3b80d8
* Accidentally broke this file.Owen Anderson2009-06-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73552 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the Win32 implementation, since it doesn't compile pre-Vista.Owen Anderson2009-06-161-12/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73550 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix/cleanup trailing newlines.Owen Anderson2009-06-161-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73546 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a portable wrapper for reader-writer locks.Owen Anderson2009-06-164-1/+268
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73545 91177308-0d34-0410-b5e6-96231b3b80d8
* glibc has two versions of strerror_r, a standards compliant one and a GNUDan Gohman2009-06-151-1/+8
| | | | | | | | | | | | | | | specific one. The GNU one is chosen when _GNU_SOURCE is defined. g++ always defines _GNU_SOURCE on linux platforms because glibc's headers won't compile in C++ mode without it. The GNU strerror_r doesn't always modify the buffer which causes empty error messages on linux. This patch changes MakeErrMsg to use the return value of strerror_r to get the string instead of assuming the buffer will be modified, on GLIBC. Patch by Benjamin Kramer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73396 91177308-0d34-0410-b5e6-96231b3b80d8
* "This patch implements the method with the GetModuleFileName function for ↵Chris Lattner2009-06-151-1/+3
| | | | | | | | | windows." Patch by Benjamin Kramer! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73379 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new static method to portably determine whether a patch isChris Lattner2009-06-152-0/+22
| | | | | | | absolute or not, based on a patch by Gregory Curfman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73368 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments.Edwin Török2009-06-041-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72858 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for outputting ANSI colors to raw_fd_ostream.Edwin Török2009-06-042-0/+125
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72854 91177308-0d34-0410-b5e6-96231b3b80d8
* At a newline at the end of this file.Duncan Sands2009-06-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72767 91177308-0d34-0410-b5e6-96231b3b80d8
* Undef MemoryFence when compiling on MSVC.Owen Anderson2009-06-021-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72732 91177308-0d34-0410-b5e6-96231b3b80d8
* Untabification.Bill Wendling2009-05-301-42/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72604 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around a page size issue on Cygwin.Jay Foad2009-05-231-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72332 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Atomic.cpp to the CMake build system.Owen Anderson2009-05-211-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72202 91177308-0d34-0410-b5e6-96231b3b80d8
* Tabs, be gone!Owen Anderson2009-05-201-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72180 91177308-0d34-0410-b5e6-96231b3b80d8
* I just fail today.Owen Anderson2009-05-201-3/+3
| | | | | | | Hopefully this fixes the last build errors on systems with GCC < 4.1. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72179 91177308-0d34-0410-b5e6-96231b3b80d8
* Copy-and-paste-o.Owen Anderson2009-05-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72177 91177308-0d34-0410-b5e6-96231b3b80d8
* Move atomic operations' definitions out of line. While this seems kind of ↵Owen Anderson2009-05-201-0/+52
| | | | | | | | | silly, all kinds of problems caused by including windows.h and/or config.h in an LLVM header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72174 91177308-0d34-0410-b5e6-96231b3b80d8
* termios.h contains the winsize structure we need to determine theDouglas Gregor2009-05-181-1/+4
| | | | | | | | width of a terminal. Don't try to get the width of a terminal if we don't have this header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72018 91177308-0d34-0410-b5e6-96231b3b80d8
* Add terminal width detection to llvm::sys::Process. This is needed toDouglas Gregor2009-05-112-0/+53
| | | | | | | fix Clang PRs 4148 and 4183. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71448 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix choice of version of Windows callback to use to consider not only the ↵Stefanus Du Toit2009-04-281-1/+12
| | | | | | | | Visual Studio version, but also the Windows SDK version. Patch by Tareq Siraj. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70299 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix g++-4.4.0 warning, it was causing llvm-nm to fail on wrapped BC files:Edwin Török2009-04-251-1/+1
| | | | | | | | | | | | | | Path.cpp:59: warning: case label value exceeds maximum value for type magic[0] is a (signed) char, but some case values are unsigned (e.g. 0xde). When magic[0] was 0xde, the switch has taken the default branch instead of case 0xde branch. Apparently this was the behaviour with older versions of gcc too, but not with g++. Now g++-4.4 behaves as gcc, and ignores unsigned case values out of range signed range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70038 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence warnings.Anton Korobeynikov2009-04-211-5/+5
| | | | | | Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69679 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop obsolete reference to __eprintf.Anton Korobeynikov2009-04-211-2/+0
| | | | | | Patch by Jay Foad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69678 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Unix.h:MakeErrMsg separate the prefix and errno string, so we get:Daniel Dunbar2009-04-204-7/+10
| | | | | | | | | | | | | | | | | | clang: error: unable to make temporary file: /etc/cc: can't make unique filename: Permission denied instead of clang: error: unable to make temporary file: /etc/cc: can't make unique filenamePermission denied for example. Also, audited the uses of MakeErrMsg to make the prefix strings consistent (not end with newline/punctuation/space/": "). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69626 91177308-0d34-0410-b5e6-96231b3b80d8