From 93823ed30cf46064e37e586560978e58cab110d2 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Mon, 1 Dec 2003 21:33:31 +0000 Subject: Lock abstraction, introduced with a view toward making the JIT thread-safe. Eventually. llvm-svn: 10284 --- llvm/lib/Support/Mutex.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 llvm/lib/Support/Mutex.cpp (limited to 'llvm/lib/Support/Mutex.cpp') diff --git a/llvm/lib/Support/Mutex.cpp b/llvm/lib/Support/Mutex.cpp new file mode 100644 index 00000000000..6271797da47 --- /dev/null +++ b/llvm/lib/Support/Mutex.cpp @@ -0,0 +1,24 @@ +//===-- Support/Lock.cpp - Platform-agnostic mutual exclusion -------------===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// Implementation of various methods supporting platform-agnostic lock +// abstraction. See Support/Lock.h for details. +// +//===----------------------------------------------------------------------===// + +#include "Support/Lock.h" + +using namespace llvm; + +Lock Lock::create () { + // Currently we only support creating POSIX pthread_mutex_t locks. + // In the future we might want to construct different kinds of locks + // based on what OS is running. + return POSIXLock (); +} -- cgit v1.2.3