Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
these files are useless in the new implementation of the context switch mechanism
[simgrid.git] / src / xbt / xbt_thread_context.h
1 #ifndef _XBT_THREAD_CONTEXT_H\r
2 #define _XBT_THREAD_CONTEXT_H\r
3 \r
4 #include "portable.h"           /* loads context system definitions                                                                                                                     */\r
5 #include "xbt/xbt_os_thread.h"          /* declaration of the xbt native semaphore and native thread                                                            */\r
6 #include "xbt/swag.h"\r
7 \r
8 \r
9 #ifndef _XBT_CONTEXT_PRIVATE_H\r
10 /*#include "xbt_context_private.h"*/\r
11 #endif /* _XBT_CONTEXT_PRIVATE_H */\r
12 \r
13 SG_BEGIN_DECL()\r
14 \r
15 #ifndef _XBT_CONTEXT_FACTORY_T_DEFINED\r
16 typedef struct s_xbt_context_factory* xbt_context_factory_t;\r
17 #define _XBT_CONTEXT_FACTORY_T_DEFINED\r
18 #endif /* !_XBT_CONTEXT_FACTORY_T_DEFINED */\r
19 \r
20 \r
21 typedef struct s_xbt_thread_context\r
22 {\r
23         XBT_CTX_BASE_T;\r
24         xbt_os_thread_t thread;                 /* a plain dumb thread (portable to posix or windows)                                                                           */\r
25         xbt_os_sem_t begin;                             /* this semaphore is used to schedule/yield the process                                                                         */\r
26         xbt_os_sem_t end;                               /* this semaphore is used to schedule/unschedule the process                                                            */\r
27 }s_xbt_thread_context_t,* xbt_thread_context_t;\r
28 \r
29 int\r
30 xbt_thread_context_factory_init(xbt_context_factory_t* factory);\r
31 \r
32 SG_END_DECL()\r
33 \r
34 #endif /* !_XBT_THREAD_CONTEXT_H */\r