Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ramstore
fast-ipc-module
Commits
bacebf82
Commit
bacebf82
authored
Feb 08, 2016
by
Michael Quigley
Browse files
removed some print statements, and refactored a little
parent
921cedba
Changes
2
Hide whitespace changes
Inline
Side-by-side
current/tests/rpc/callee.c
View file @
bacebf82
#include
<linux/random.h>
#include
<linux/random.h>
#include
<linux/slab.h>
#include
<linux/slab.h>
#include
"rpc.h"
#include
"rpc.h"
#include
<
lcd-domains/
thc.h>
#include
<thc.h>
#include
<
lcd-domains/
thcinternal.h>
#include
<thcinternal.h>
#include
<
lcd-domains/
awe-mapper.h>
#include
<awe-mapper.h>
static
struct
ttd_ring_channel
*
channel
;
static
struct
ttd_ring_channel
*
channel
;
...
@@ -191,7 +191,7 @@ static unsigned long add_6_nums(unsigned long trans, unsigned long res1,
...
@@ -191,7 +191,7 @@ static unsigned long add_6_nums(unsigned long trans, unsigned long res1,
static
void
test_async_ipc
(
void
*
chan
)
void
test_async_ipc
(
void
*
chan
)
{
{
unsigned
long
num_transactions
=
0
;
unsigned
long
num_transactions
=
0
;
unsigned
long
res1
,
res2
,
res3
,
res4
,
res5
,
res6
;
unsigned
long
res1
,
res2
,
res3
,
res4
,
res5
,
res6
;
...
@@ -276,12 +276,14 @@ int callee(void *chan)
...
@@ -276,12 +276,14 @@ int callee(void *chan)
//NOTE: Setting the return address like below is a hack
//NOTE: Setting the return address like below is a hack
//if async is run inside a kernel thread, it is important to do this,
//if async is run inside a kernel thread, it is important to do this,
//then restore it when async finishes.
//then restore it when async finishes.
void
**
frame
=
(
void
**
)
__builtin_frame_address
(
0
);
volatile
void
**
frame
=
(
volatile
void
**
)
__builtin_frame_address
(
0
);
void
*
ret_addr
=
*
(
frame
+
1
);
volatile
void
*
ret_addr
=
*
(
frame
+
1
);
*
(
frame
+
1
)
=
NULL
;
*
(
frame
+
1
)
=
NULL
;
test_async_ipc
(
chan
);
test_async_ipc
(
chan
);
*
(
frame
+
1
)
=
ret_addr
;
*
(
frame
+
1
)
=
ret_addr
;
return
1
;
return
1
;
}
}
current/tests/rpc/rpc.h
View file @
bacebf82
...
@@ -6,7 +6,7 @@ typedef enum {NULL_INVOCATION, ADD_CONSTANT, ADD_NUMS, ADD_3_NUMS,
...
@@ -6,7 +6,7 @@ typedef enum {NULL_INVOCATION, ADD_CONSTANT, ADD_NUMS, ADD_3_NUMS,
ADD_4_NUMS
,
ADD_5_NUMS
,
ADD_6_NUMS
}
fn_types
;
ADD_4_NUMS
,
ADD_5_NUMS
,
ADD_6_NUMS
}
fn_types
;
/* must be divisible by 6... because I call 6 functions in the Callee.c */
/* must be divisible by 6... because I call 6 functions in the Callee.c */
#define TRANSACTIONS 6
0
#define TRANSACTIONS 6
int
callee
(
void
*
chan
);
int
callee
(
void
*
chan
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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