source:
tests/linking/exception-withthreads.cfa
@
1ab773e0
Last change on this file since 1ab773e0 was c715e5f, checked in by , 2 years ago | |
---|---|
|
|
File size: 780 bytes |
Rev | Line | |
---|---|---|
[5715d43] | 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 | // exception-withthreads.cfa -- | |
8 | // | |
9 | // Author : Andrew Beach | |
10 | // Created On : Thr 13 16:12:00 2020 | |
11 | // Last Modified By : Andrew Beach | |
12 | // Last Modified On : Fri 14 11:20:00 2020 | |
13 | // Update Count : 0 | |
14 | // | |
15 | ||
16 | #include <stdlib.hfa> | |
17 | #include "../exceptions/with-threads.hfa" | |
18 | ||
[c715e5f] | 19 | exception ping {}; |
20 | vtable(ping) ping_vt; | |
[5715d43] | 21 | |
22 | int main(void) { | |
23 | try { | |
[ecfd758] | 24 | throwResume (ping){&ping_vt}; |
[5715d43] | 25 | } catchResume (ping *) { |
26 | printf("%s threads\n", threading_enabled() ? "with" : "no"); | |
27 | } | |
28 | return 0; | |
29 | } | |
30 | ||
31 | // Local Variables: // | |
32 | // tab-width: 4 // | |
33 | // compile-command: "cfa nothreads.cfa" // | |
34 | // End: // |
Note: See TracBrowser
for help on using the repository browser.