X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=libthreads.c;h=5ede8d7eafa5a7cf0e32f740434872c5f9c82987;hp=4545ee3640a79a542e1c61f199bd37853c4c9231;hb=8090a361f8800cfced794c0adbf8a91778d3cec6;hpb=0b930bb715fcfc231ee297ac2294c7f9402337b7 diff --git a/libthreads.c b/libthreads.c index 4545ee36..5ede8d7e 100644 --- a/libthreads.c +++ b/libthreads.c @@ -1,28 +1,13 @@ #include #include #include -#include //#define CONFIG_DEBUG -#ifdef CONFIG_DEBUG -#define DBG() do { printf("Here: %s, L%d\n", __func__, __LINE__); } while (0) -#define DEBUG(fmt, ...) printf(fmt, ##__VA_ARGS__) -#else -#define DBG() -#define DEBUG(fmt, ...) -#endif +#include "libthreads.h" #define STACK_SIZE (1024 * 1024) -struct thread { - void (*start_routine); - void *arg; - ucontext_t context; - void *stack; - int index; -}; - static struct thread *current; static ucontext_t *cleanup;