source: libcfa/src/concurrency/mutex_stmt.hfa@ d60a4c2

Last change on this file since d60a4c2 was 10b5970, checked in by Michael Brooks <mlbrooks@…>, 9 months ago

Fix many test-suite- and libcfa-caused unused variable warnings.

In scope are easy fixes among tests whose sole warnings were unused variable. Reduces the wflags lax list by 40%.

  • Property mode set to 100644
File size: 836 bytes
Line 
1#pragma once
2
3#include "bits/algorithm.hfa"
4#include "bits/defs.hfa"
5
6//-----------------------------------------------------------------------------
7// is_lock
8forall(L & | sized(L))
9trait is_lock {
10 // For acquiring a lock
11 void lock( L & );
12
13 // For releasing a lock
14 void unlock( L & );
15};
16
17struct __mutex_stmt_lock_guard {
18 void ** lockarr;
19 __lock_size_t count;
20};
21
22static inline void ?{}( __mutex_stmt_lock_guard & this, void * lockarr [], __lock_size_t count ) {
23 this.lockarr = lockarr;
24 this.count = count;
25
26 // Sort locks based on address
27 __libcfa_small_sort(this.lockarr, count);
28}
29
30forall(L & | is_lock(L)) {
31 static inline void * __get_mutexstmt_lock_ptr( L & this ) { return &this; }
32 static inline L __get_mutexstmt_lock_type( L & ) {}
33 static inline L __get_mutexstmt_lock_type( L * ) {}
34}
Note: See TracBrowser for help on using the repository browser.