From 9f39952c3b33c4b705d64d856df8ea8c9992fde7 Mon Sep 17 00:00:00 2001 From: Jan Stoess Date: Wed, 14 Jul 2010 16:36:15 +0200 Subject: [PATCH] Initialze pingpong memory early --- user/apps/bench/pingpong/pingpong.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/user/apps/bench/pingpong/pingpong.cc b/user/apps/bench/pingpong/pingpong.cc index 213970a5..ba3f930e 100644 --- a/user/apps/bench/pingpong/pingpong.cc +++ b/user/apps/bench/pingpong/pingpong.cc @@ -96,7 +96,7 @@ bool tbuf, hsched; if (tbuf) L4_Tbuf_RecordEvent (1, args); #else -#define Dprintf(...) +#define Dprintf(x...) #endif L4_ThreadId_t s0tid, roottid, pager_tid, ping_tid, pong_tid; @@ -443,12 +443,6 @@ int main (void) kip_area = L4_FpageLog2 ((L4_Word_t) kip, L4_KipAreaSizeLog2 (kip)); #endif - // We need a maximum of two threads per task - utcb_area = L4_FpageLog2 ((L4_Word_t) UTCB_ADDRESS, - L4_UtcbAreaSizeLog2 (kip) + 1); - Dprintf ("kip_area = %lx, utcb_area = %lx, utcb_size = %lx\n", - kip_area.raw, utcb_area.raw, utcb_size); - // Touch the memory to make sure we never get pagefaults extern L4_Word_t _end, _start; for (L4_Word_t * x = (&_start); x < &_end; x++) @@ -456,7 +450,13 @@ int main (void) volatile L4_Word_t q; q = *(volatile L4_Word_t*) x; } - + + // We need a maximum of two threads per task + utcb_area = L4_FpageLog2 ((L4_Word_t) UTCB_ADDRESS, + L4_UtcbAreaSizeLog2 (kip) + 1); + Dprintf ("kip_area = %lx, utcb_area = %lx, utcb_size = %lx\n", + kip_area.raw, utcb_area.raw, utcb_size); + // Create pager pager_tid = L4_GlobalId (L4_ThreadNo (roottid) + 1, 2); ping_tid = L4_GlobalId (L4_ThreadNo (roottid) + 2, 2);