6 * coroutine - Co-routines
8 * This code has helper functions for implementing co-routines, that
9 * is, explicit co-operative context switching. It's intended to
10 * provide similar functionality to ucontext, but with a cleaner
11 * interface. At the moment this is implemented in terms of ucontext,
12 * but the hope is to add other implementations for platforms that
13 * don't have ucontext in future.
15 * Author: David Gibson <david@gibson.dropbear.id.au>
16 * License: LGPL (v2.1 or any later version)
18 int main(int argc, char *argv[])
20 /* Expect exactly one argument */
24 if (strcmp(argv[1], "depends") == 0) {
25 printf("ccan/ptrint\n");
26 printf("ccan/compiler\n");
27 printf("ccan/build_assert\n");
28 printf("ccan/typesafe_cb\n");
32 if (strcmp(argv[1], "ported") == 0) {
34 printf("Requires working ucontext.h\n");
39 if (strcmp(argv[1], "ccanlint") == 0) {
40 #if !HAVE_VALGRIND_MEMCHECK_H
41 /* valgrind needs extra information to cope with stack
43 printf("tests_pass_valgrind FAIL\n");