]> git.ozlabs.org Git - ccan/blobdiff - ccan/coroutine/coroutine.h
coroutine: Enable valgrind
[ccan] / ccan / coroutine / coroutine.h
index 1d746f493f1c7f1b0c653e05e7850446ab8a0e36..7a8c88f112eccc2b021037c40c9bd04faa8465ad 100644 (file)
  * Describes a stack suitable for executing a coroutine.  This
  * structure is always contained within the stack it describes.
  */
-struct coroutine_stack;
+struct coroutine_stack {
+       uint64_t magic;
+       size_t size;
+       int valgrind_id;
+};
 
 /**
  * struct coroutine_state
@@ -37,7 +41,7 @@ struct coroutine_state;
  * Number of bytes of a stack which coroutine needs for its own
  * tracking information.
  */
-#define COROUTINE_STK_OVERHEAD         (sizeof(uint64_t) + sizeof(size_t))
+#define COROUTINE_STK_OVERHEAD sizeof(struct coroutine_stack)
 
 /**
  * COROUTINE_MIN_STKSZ - Minimum coroutine stack size