3 /* Copyright (c) 2004 Arnaud Legrand. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
12 #include "xbt/function_types.h"
13 #include "xbt_modinter.h" /* init/exit of this module */
15 /** @addtogroup XBT_context
17 * INTERNALS OF SIMGRID, DON'T USE IT.
19 * This is a portable to Unix and Windows context implementation.
24 /** @name Context types
28 /** @brief A context */
29 typedef struct s_xbt_context *xbt_context_t;
33 void xbt_context_empty_trash(void);
34 XBT_PUBLIC(xbt_context_t) xbt_context_new(xbt_main_func_t code,
35 void_f_pvoid_t startup_func, void *startup_arg,
36 void_f_pvoid_t cleanup_func, void *cleanup_arg,
37 int argc, char *argv[]);
38 XBT_PUBLIC(void) xbt_context_kill(xbt_context_t context);
39 XBT_PUBLIC(void) xbt_context_start(xbt_context_t context);
40 XBT_PUBLIC(void) xbt_context_yield(void);
41 XBT_PUBLIC(void) xbt_context_schedule(xbt_context_t context);
43 void xbt_context_set_jprocess(xbt_context_t context, void *jp);
44 void* xbt_context_get_jprocess(xbt_context_t context);
46 void xbt_context_set_jmutex(xbt_context_t context,void *jm);
47 void* xbt_context_get_jmutex(xbt_context_t context);
49 void xbt_context_set_jcond(xbt_context_t context,void *jc);
50 void* xbt_context_get_jcond(xbt_context_t context);
52 void xbt_context_set_jenv(xbt_context_t context,void* je);
53 void* xbt_context_get_jenv(xbt_context_t context);
56 #endif /* _XBT_CONTEXT_H */