Commit bacebf82 authored by Michael Quigley's avatar Michael Quigley
Browse files

removed some print statements, and refactored a little

parent 921cedba
#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;
} }
...@@ -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 60 #define TRANSACTIONS 6
int callee(void *chan); int callee(void *chan);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment