Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
make communications from an host to itself instantaneous
[simgrid.git] / src / xbt / context_private.h
1 /*      $Id$     */
2
3 /* Copyright (c) 2004 Arnaud Legrand. All rights reserved.                  */
4
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. */
7
8 #ifndef _XBT_CONTEXT_PRIVATE_H
9 #define _XBT_CONTEXT_PRIVATE_H
10
11
12 #include "xbt/sysdep.h"
13 #include "xbt/swag.h"
14 #include "xbt/context.h"
15 #include "portable.h" /* loads context system definitions */
16
17 #define STACK_SIZE 524288
18 typedef struct s_xbt_context {
19   s_xbt_swag_hookup_t hookup;
20   ucontext_t uc;                /* the thread that execute the code   */
21   char stack[STACK_SIZE];
22   xbt_context_function_t code;        /* the scheduler fonction   */
23   int argc;
24   char **argv;
25   struct s_xbt_context *save;
26   void_f_pvoid_t *startup_func;
27   void *startup_arg;
28   void_f_pvoid_t *cleanup_func;
29   void *cleanup_arg;
30 } s_xbt_context_t;
31
32 #endif              /* _XBT_CONTEXT_PRIVATE_H */