- File:
-
- 1 edited
-
libcfa/src/concurrency/mutex_stmt.hfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/mutex_stmt.hfa
r9a9ca36 r0d4f954 1 #pragma once2 3 1 #include "bits/algorithm.hfa" 4 2 #include "bits/defs.hfa" … … 6 4 //----------------------------------------------------------------------------- 7 5 // is_lock 8 forall(L & | sized(L)) 9 trait is_lock { 6 trait is_lock(L & | sized(L)) { 10 7 // For acquiring a lock 11 8 void lock( L & ); … … 27 24 // Sort locks based on address 28 25 __libcfa_small_sort(this.lockarr, count); 26 27 // acquire locks in order 28 // for ( size_t i = 0; i < count; i++ ) { 29 // lock(*this.lockarr[i]); 30 // } 31 } 32 33 static inline void ^?{}( __mutex_stmt_lock_guard & this ) with(this) { 34 // for ( size_t i = count; i > 0; i-- ) { 35 // unlock(*lockarr[i - 1]); 36 // } 29 37 } 30 38
Note:
See TracChangeset
for help on using the changeset viewer.