diff options
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r-- | include/qemu/osdep.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index bd23a08..c850001 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -157,6 +157,22 @@ extern "C" { #include "qemu/typedefs.h" +/** + * Mark a function that executes in coroutine context + * + * Functions that execute in coroutine context cannot be called directly from + * normal functions. In the future it would be nice to enable compiler or + * static checker support for catching such errors. This annotation might make + * it possible and in the meantime it serves as documentation. + * + * For example: + * + * static void coroutine_fn foo(void) { + * .... + * } + */ +#define coroutine_fn + /* * For mingw, as of v6.0.0, the function implementing the assert macro is * not marked as noreturn, so the compiler cannot delete code following an |