aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
Commit message (Collapse)AuthorAgeFilesLines
* eraseFromDisk no longer throws.Chris Lattner2009-07-091-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75139 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an ExecuteNoWait interface to support asynchronous process spawning.David Greene2009-07-082-0/+237
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75055 91177308-0d34-0410-b5e6-96231b3b80d8
* remove two methods that no longer exist.Chris Lattner2009-07-081-24/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74982 91177308-0d34-0410-b5e6-96231b3b80d8
* more getting windows to build.Chris Lattner2009-07-081-14/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74981 91177308-0d34-0410-b5e6-96231b3b80d8
* hopefully fix the build on windows.Chris Lattner2009-07-081-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74977 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the static constructors and locks from DynamicLibrary.cpp.Chris Lattner2009-07-071-26/+27
| | | | | | | | | | | | | | | | | | | | This fixes PR4512 and eliminating static ctors is always good. Losing thread safety is unfortunate, but the code is just incredibly poorly designed. If someone is interested, the "right" solution is to split DynamicLibrary.cpp into two separate pieces: a stateless piece in libsystem, and a simple support file in libsupport that has the "state" (e.g. AddSymbol) in managed static objects. Doing this would both fix memory leaks we already have, as well as make the code thread safe again. it would also make sense to move all the unix specific code in System/DynamicLibrary.cpp into System/Unix/DynamicLibrary.inc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74927 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead code, noone creates instances of "DynamicLibrary", so the ctor ↵Chris Lattner2009-07-071-10/+1
| | | | | | and dtor are dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74926 91177308-0d34-0410-b5e6-96231b3b80d8
* we don't use libtool anymore, update comments.Chris Lattner2009-07-071-12/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74924 91177308-0d34-0410-b5e6-96231b3b80d8
* 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