aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
Commit message (Collapse)AuthorAgeFilesLines
...
* No need to double-include config.hOwen Anderson2009-07-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74854 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to include config.h to get the proper setting to LLVM_MULTITHREADED.Owen Anderson2009-07-061-0/+1
| | | | | | | Patch by Xerxes Ranby. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74846 91177308-0d34-0410-b5e6-96231b3b80d8
* improve portability to windows, patch by Xerces Ranby!Chris Lattner2009-07-061-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74835 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops, I #included errno.h from inside the llvm::sys namespace.Jeffrey Yasskin2009-07-061-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74834 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix windows build, patch by Howard Su.Duncan Sands2009-07-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74697 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes theJeffrey Yasskin2009-07-013-26/+74
| | | | | | | | | Windows variant, strerror_s, but I couldn't test that. I'll update configure and config.h.in in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74621 91177308-0d34-0410-b5e6-96231b3b80d8
* Try again at making this work on OpenBSD.Owen Anderson2009-07-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74612 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build on OpenBSD.Owen Anderson2009-07-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74597 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed assert that checks return value of TlsSetValue.Oscar Fuentes2009-06-301-1/+1
| | | | | | | | | See http://msdn.microsoft.com/en-us/library/ms686818(VS.85).aspx Patch by Olaf Krzikalla! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74526 91177308-0d34-0410-b5e6-96231b3b80d8
* 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