source: tests/linking/io-acquire.cfa @ 182256b

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 182256b was 182256b, checked in by Peter A. Buhr <pabuhr@…>, 3 years ago

add test to verify IO-stream locking does link with thread library for sequential program

  • Property mode set to 100644
File size: 740 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
20int main() {
21        int i;
22        if(threading_enabled()) {
23                stdout | acquire | "YES";
24                stdin | i;
25        } else {
26                stdout | acquire | "NO";
27                stdin | i;
28        }
29}
30
31// Local Variables: //
32// tab-width: 4 //
33// compile-command: "cfa io-acquire.cfa" //
34// End: //
Note: See TracBrowser for help on using the repository browser.