Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mu
mu-impl-ref2
Commits
22a4132f
Commit
22a4132f
authored
Dec 02, 2015
by
Kunshan Wang
Browse files
WIP: Bindings for all API messages.
parent
fc2bb5bc
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
cinclude/muapi.h
View file @
22a4132f
...
...
@@ -43,13 +43,19 @@ typedef void (*MuCFP)();
// Result of a trap handler
typedef
int
MuTrapHandlerResult
;
// Used by new_thread
typedef
int
MuHowToResume
;
// Values or MuTrapHandlerResult
#define MU_THREAD_EXIT 0x00
// Values or MuTrapHandlerResult and muHowToResume
#define MU_REBIND_PASS_VALUES 0x01
#define MU_REBIND_THROW_EXC 0x02
// Used by MuTrapHandler
typedef
void
(
*
MuValuesFreer
)(
MuValue
*
values
,
MuCPtr
freerdata
);
// Declare the types here because they are used in the following signatures.
typedef
struct
MuVM
MuVM
;
typedef
struct
MuCtx
MuCtx
;
...
...
@@ -57,13 +63,14 @@ typedef struct MuCtx MuCtx;
// Signature of the trap handler
typedef
void
(
*
MuTrapHandler
)(
MuCtx
*
ctx
,
MuThreadRefValue
thread
,
MuStackRefValue
stack
,
int
wpid
,
MuTrapHandlerResult
*
result
,
MuStackRefValue
*
new_stack
,
MuValue
*
values
,
int
*
nvalues
,
MuRefValue
*
exception
,
MuStackRefValue
*
new_stack
,
MuValue
*
*
values
,
int
*
nvalues
,
MuValuesFreer
*
freer
,
MuCPtr
*
freerdata
,
MuRefValue
*
exception
,
MuCPtr
userdata
);
// Memory orders
typedef
int
MuMemOrd
;
// Values of MuMemOrd
#define MU_NOT_ATOMIC 0x00
#define MU_RELAXED 0x01
#define MU_CONSUME 0x02
...
...
@@ -75,6 +82,7 @@ typedef int MuMemOrd;
// Operations for the atomicrmw API function
typedef
int
MuAtomicRMWOp
;
// Values of MuAtomicRMWOp
#define MU_XCHG 0x00
#define MU_ADD 0x01
#define MU_SUB 0x02
...
...
@@ -213,7 +221,7 @@ struct MuCtx {
// Thread and stack creation and stack destruction
MuStackRefValue
(
*
new_stack
)(
MuCtx
*
ctx
,
MuFuncRefValue
func
);
MuThreadRefValue
(
*
new_thread
)(
MuCtx
*
ctx
,
MuStackRefValue
stack
,
MuHowToResume
*
htr
,
MuValue
*
vals
,
int
nvals
,
MuRefValue
*
exc
);
MuHowToResume
*
htr
,
MuValue
*
vals
,
int
nvals
,
MuRefValue
exc
);
void
(
*
kill_stack
)(
MuCtx
*
ctx
,
MuStackRefValue
stack
);
// Frame cursor operations
...
...
src/main/scala/uvm/refimpl/nat/nativeClientSupport.scala
View file @
22a4132f
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment