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/dynar.h" /* void_f_pvoid_t */
14 /** @addtogroup XBT_context
16 * INTERNALS OF SIMGRID, DON'T USE IT.
18 * This is a portable to Unix and Windows context implementation.
23 /** @name Context types
27 /** @brief A context */
28 typedef struct s_xbt_context *xbt_context_t;
29 /** @brief A context function */
30 typedef int(*xbt_context_function_t)(int argc, char *argv[]);
34 XBT_PUBLIC void xbt_context_init(void);
35 XBT_PUBLIC void xbt_context_exit(void);
36 XBT_PUBLIC void xbt_context_empty_trash(void);
37 XBT_PUBLIC xbt_context_t xbt_context_new(xbt_context_function_t code,
38 void_f_pvoid_t startup_func, void *startup_arg,
39 void_f_pvoid_t cleanup_func, void *cleanup_arg,
40 int argc, char *argv[]);
41 XBT_PUBLIC void xbt_context_free(xbt_context_t context);
42 XBT_PUBLIC void xbt_context_start(xbt_context_t context);
43 XBT_PUBLIC void xbt_context_yield(void);
44 XBT_PUBLIC void xbt_context_schedule(xbt_context_t context);
46 #endif /* _XBT_CONTEXT_H */