Last change
on this file since 960665c was
237df76,
checked in by Peter A. Buhr <pabuhr@…>, 3 years ago
|
convert from test programs I/O acquire to mutex statement
|
-
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 | // io-acquire.cfa -- |
---|
8 | // test whether or not fstream acquire 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 | #include <mutex_stmt.hfa> |
---|
20 | |
---|
21 | int main() { |
---|
22 | int i; |
---|
23 | if(threading_enabled()) { |
---|
24 | mutex( stdout ) stdout | "YES"; |
---|
25 | stdin | i; |
---|
26 | } else { |
---|
27 | mutex( stdout ) stdout | "NO"; |
---|
28 | stdin | i; |
---|
29 | } |
---|
30 | } |
---|
31 | |
---|
32 | // Local Variables: // |
---|
33 | // tab-width: 4 // |
---|
34 | // compile-command: "cfa io-acquire.cfa" // |
---|
35 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.