| Charles Davis | 54c9eb6 | 2010-11-29 19:44:50 +0000 | [diff] [blame] | 1 | //===- llvm/Support/Unix/Mutex.inc - Unix Mutex Implementation ---*- C++ -*-===// |
| Michael J. Spencer | 447762d | 2010-11-29 18:16:10 +0000 | [diff] [blame] | 2 | // |
| Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| Michael J. Spencer | 447762d | 2010-11-29 18:16:10 +0000 | [diff] [blame] | 6 | // |
| Reid Spencer | f404981 | 2005-07-12 15:37:43 +0000 | [diff] [blame] | 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file implements the Unix specific (non-pthread) Mutex class. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | //=== WARNING: Implementation here must contain only generic UNIX code that |
| 15 | //=== is guaranteed to work on *all* UNIX variants. |
| 16 | //===----------------------------------------------------------------------===// |
| 17 | |
| 18 | namespace llvm |
| 19 | { |
| 20 | using namespace sys; |
| 21 | |
| Owen Anderson | 68f6598 | 2009-06-18 17:53:17 +0000 | [diff] [blame] | 22 | MutexImpl::MutexImpl( bool recursive) |
| Reid Spencer | f404981 | 2005-07-12 15:37:43 +0000 | [diff] [blame] | 23 | { |
| 24 | } |
| 25 | |
| Owen Anderson | 68f6598 | 2009-06-18 17:53:17 +0000 | [diff] [blame] | 26 | MutexImpl::~MutexImpl() |
| Reid Spencer | f404981 | 2005-07-12 15:37:43 +0000 | [diff] [blame] | 27 | { |
| 28 | } |
| 29 | |
| Michael J. Spencer | 447762d | 2010-11-29 18:16:10 +0000 | [diff] [blame] | 30 | bool |
| Owen Anderson | 68f6598 | 2009-06-18 17:53:17 +0000 | [diff] [blame] | 31 | MutexImpl::release() |
| Reid Spencer | f404981 | 2005-07-12 15:37:43 +0000 | [diff] [blame] | 32 | { |
| Reid Spencer | 1792326 | 2006-12-05 17:53:26 +0000 | [diff] [blame] | 33 | return true; |
| Reid Spencer | f404981 | 2005-07-12 15:37:43 +0000 | [diff] [blame] | 34 | } |
| 35 | |
| Michael J. Spencer | 447762d | 2010-11-29 18:16:10 +0000 | [diff] [blame] | 36 | bool |
| Owen Anderson | 68f6598 | 2009-06-18 17:53:17 +0000 | [diff] [blame] | 37 | MutexImpl::tryacquire( void ) |
| Reid Spencer | f404981 | 2005-07-12 15:37:43 +0000 | [diff] [blame] | 38 | { |
| Reid Spencer | 1792326 | 2006-12-05 17:53:26 +0000 | [diff] [blame] | 39 | return true; |
| Reid Spencer | f404981 | 2005-07-12 15:37:43 +0000 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | } |