ADT
arm-eh
ast-experimental
enum
forall-pointer-decay
jacob/cs343-translation
new-ast-unique-expr
pthread-emulation
qualifiedEnum
Last change
on this file since 7d51ef8 was ecfd758, checked in by Andrew Beach <ajbeach@…>, 4 years ago |
Major exception update, seperating type-ids from virtual tables. The major interface changes are done. There is a regression of ?Cancelled(T) to Some?Cancelled. There is some bits of code for the new verion of the ?Cancelled(T) interface already there. Not connected yet but I just reached the limit of what I wanted to do in one commit and then spent over a day cleaning up, so it will replace Some?Cancelled in a future commit.
|
-
Property mode
set to
100644
|
File size:
821 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 <exception.hfa>
|
---|
| 18 | #include "../exceptions/with-threads.hfa"
|
---|
| 19 |
|
---|
[ecfd758] | 20 | EHM_EXCEPTION(ping)();
|
---|
| 21 | EHM_VIRTUAL_TABLE(ping, ping_vt);
|
---|
[5715d43] | 22 |
|
---|
| 23 | int main(void) {
|
---|
| 24 | try {
|
---|
[ecfd758] | 25 | throwResume (ping){&ping_vt};
|
---|
[5715d43] | 26 | } catchResume (ping *) {
|
---|
| 27 | printf("%s threads\n", threading_enabled() ? "with" : "no");
|
---|
| 28 | }
|
---|
| 29 | return 0;
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | // Local Variables: //
|
---|
| 33 | // tab-width: 4 //
|
---|
| 34 | // compile-command: "cfa nothreads.cfa" //
|
---|
| 35 | // End: //
|
---|
Note:
See
TracBrowser
for help on using the repository browser.