From d52282ec3292a1e366d3837e56ef1fb5f07ce178 Mon Sep 17 00:00:00 2001 From: Aiden Gall Date: Sun, 9 Feb 2025 18:02:15 +0000 Subject: initial commit --- tco.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tco.h (limited to 'tco.h') diff --git a/tco.h b/tco.h new file mode 100644 index 0000000..c8a2f3d --- /dev/null +++ b/tco.h @@ -0,0 +1,23 @@ +/* Copyright (C) 2025 Aiden Gall + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . */ + +#if defined(__GNUC__) || defined(__clang__) +#define coroutine __attribute__((noinline)) +#else +#define coroutine +#endif + +int tco_go(void (*f)(void)); +void tco_yield(void); -- cgit v1.2.3