Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'v3_9_x'
[simgrid.git] / src / smx_context_cojava.h
1 /* Copyright (c) 2012. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5   * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _XBT_CONTEXT_COJAVA_H
8 #define _XBT_CONTEXT_COJAVA_H
9
10 #include <xbt/misc.h>
11 #include <simgrid/simix.h>
12 #include <xbt/xbt_os_thread.h>
13
14 #include "jmsg.h"
15 #include "jmsg_process.h"
16
17 SG_BEGIN_DECL()
18
19 typedef struct s_smx_ctx_cojava {
20   s_smx_ctx_base_t super;       /* Fields of super implementation */
21   jobject jprocess;             /* the java process instance binded with the msg process structure */
22   JNIEnv *jenv;                 /* jni interface pointer associated to this thread */
23   jobject jcoroutine;                                           /* java coroutine object */
24   int bound:1;
25 } s_smx_ctx_cojava_t, *smx_ctx_cojava_t;
26
27 void SIMIX_ctx_cojava_factory_init(smx_context_factory_t *factory);
28 void smx_ctx_cojava_stop(smx_context_t context);
29 smx_context_t smx_ctx_cojava_self(void);
30 SG_END_DECL()
31
32 #endif                          /* !_XBT_CONTEXT_JAVA_H */