blob: 5360b41b0e65b94217b1f50c1b1b3622b46d5e39 [file] [log] [blame]
Owen Anderson0c2185a2009-06-16 20:19:28 +00001//= llvm/System/Win32/Mutex.inc - Win32 Reader/Writer Mutual Exclusion Lock =//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the Win32 specific (non-pthread) RWMutex class.
11//
12//===----------------------------------------------------------------------===//
13
14//===----------------------------------------------------------------------===//
15//=== WARNING: Implementation here must contain only generic Win32 code that
16//=== is guaranteed to work on *all* Win32 variants.
17//===----------------------------------------------------------------------===//
18
19#include "Win32.h"
20
Owen Anderson4a04e642009-06-16 20:49:20 +000021// FIXME: THIS IS NOT THREAD-SAFE!!
22// Windows does not have reader-writer locks pre-Vista. If you want to have
23// thread-safe LLVM on Windows, for now at least, you need to use a pthreads
24// replacement library.
25
Owen Anderson0c2185a2009-06-16 20:19:28 +000026namespace llvm {
27using namespace sys;
28
Owen Anderson4a04e642009-06-16 20:49:20 +000029RWMutex::RWMutex() { }
Owen Anderson0c2185a2009-06-16 20:19:28 +000030
Owen Anderson4a04e642009-06-16 20:49:20 +000031RWMutex::~RWMutex() { }
Owen Anderson0c2185a2009-06-16 20:19:28 +000032
33bool RWMutex::reader_acquire() {
Owen Anderson0c2185a2009-06-16 20:19:28 +000034 return true;
35}
36
37bool RWMutex::reader_release() {
Owen Anderson0c2185a2009-06-16 20:19:28 +000038 return true;
39}
40
41bool RWMutex::writer_acquire() {
Owen Anderson0c2185a2009-06-16 20:19:28 +000042 return true;
43}
44
45bool RWMutex::writer_release() {
Owen Anderson0c2185a2009-06-16 20:19:28 +000046 return true;
47}
48
49
50}