Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make the context cruft work on windows; mark the pthread layer in context.* as deprec...
[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/context.h"
14 #include "portable.h" /* loads context system definitions */
15
16 #define STACK_SIZE 524288
17 typedef struct s_context {
18   ucontext_t uc;                /* the thread that execute the code   */
19   char stack[STACK_SIZE];
20   context_function_t code;        /* the scheduler fonction   */
21   int argc;
22   char **argv;
23   struct s_context *save;
24 } s_context_t;
25
26
27 #if 0 /* FIXME: KILLME */
28 //#ifdef HAVE_LIBPTHREAD
29 #include <pthread.h>
30 typedef struct s_context {
31   pthread_cond_t cond;
32   pthread_mutex_t mutex;
33   pthread_t *thread;            /* the thread that execute the code   */
34   context_function_t code;                /* the scheduler fonction   */
35   int argc;
36   char *argv[];
37 } s_context_t;
38 #endif /* ENDOFKILLME*/
39
40 #endif              /* _XBT_CONTEXT_PRIVATE_H */