ADTast-experimental
Last change
on this file since ab2b352 was
0f9c010b,
checked in by Peter A. Buhr <pabuhr@…>, 4 years ago
|
fix spelling mistake in comment
|
-
Property mode set to
100644
|
File size:
778 bytes
|
Line | |
---|
1 | // |
---|
2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
3 | // |
---|
4 | // The contents of this file are covered under the licence agreement in the |
---|
5 | // file "LICENCE" distributed with Cforall. |
---|
6 | // |
---|
7 | // weakso_nothd.cfa -- |
---|
8 | // test whether or not using a weakso locks pulls in threads |
---|
9 | // |
---|
10 | // Author : Thierry Delisle |
---|
11 | // Created On : Tue Jul 16 12:14:39 2019 |
---|
12 | // Last Modified By : |
---|
13 | // Last Modified On : |
---|
14 | // Update Count : |
---|
15 | // |
---|
16 | |
---|
17 | #include <fstream.hfa> |
---|
18 | #include <stdlib.hfa> |
---|
19 | |
---|
20 | #include <bits/weakso_locks.hfa> |
---|
21 | |
---|
22 | int main() { |
---|
23 | multiple_acquisition_lock lock; |
---|
24 | lock(lock); |
---|
25 | unlock(lock); |
---|
26 | |
---|
27 | if(threading_enabled()) { |
---|
28 | stdout | "YES"; |
---|
29 | } else { |
---|
30 | stdout | "NO"; |
---|
31 | } |
---|
32 | return 0; |
---|
33 | } |
---|
34 | |
---|
35 | // Local Variables: // |
---|
36 | // tab-width: 4 // |
---|
37 | // compile-command: "cfa nothreads.cfa" // |
---|
38 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.