X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8be93beba0c7547303f5a102c2cb528b8c586066..5daf43327dc8fce985687f6306daa762ec07a4b6:/src/xbt/xbt_thread_context.c?ds=sidebyside diff --git a/src/xbt/xbt_thread_context.c b/src/xbt/xbt_thread_context.c index fb8307b89e..e502104b2f 100644 --- a/src/xbt/xbt_thread_context.c +++ b/src/xbt/xbt_thread_context.c @@ -1,5 +1,18 @@ #include "xbt/function_types.h" +#include "xbt/xbt_context_factory.h" + +#include "portable.h" /* loads context system definitions */ +#include "xbt/swag.h" +#include "xbt/xbt_os_thread.h" + + +typedef struct s_xbt_thread_context { + XBT_CTX_BASE_T; + xbt_os_thread_t thread; /* a plain dumb thread (portable to posix or windows) */ + xbt_os_sem_t begin; /* this semaphore is used to schedule/yield the process */ + xbt_os_sem_t end; /* this semaphore is used to schedule/unschedule the process */ +} s_xbt_thread_context_t,* xbt_thread_context_t; static xbt_context_t xbt_thread_context_factory_create_context(const char* name, xbt_main_func_t code, void_f_pvoid_t startup_func, void* startup_arg, void_f_pvoid_t cleanup_func, void* cleanup_arg, int argc, char** argv);