From 04b08da9af0c450d645ab7389d1467308cfc2db8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 4 Mar 2013 21:27:36 +0100 Subject: Imported Upstream version 1.1~hg20130304 --- src/pkg/runtime/export_test.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'src/pkg/runtime/export_test.go') diff --git a/src/pkg/runtime/export_test.go b/src/pkg/runtime/export_test.go index 51921135b..062aea248 100644 --- a/src/pkg/runtime/export_test.go +++ b/src/pkg/runtime/export_test.go @@ -25,3 +25,45 @@ var Entersyscall = entersyscall var Exitsyscall = exitsyscall var LockedOSThread = golockedOSThread var Stackguard = stackguard + +type LFNode struct { + Next *LFNode + Pushcnt uintptr +} + +func lfstackpush(head *uint64, node *LFNode) +func lfstackpop2(head *uint64) *LFNode + +var LFStackPush = lfstackpush +var LFStackPop = lfstackpop2 + +type ParFor struct { + body *byte + done uint32 + Nthr uint32 + nthrmax uint32 + thrseq uint32 + Cnt uint32 + Ctx *byte + wait bool +} + +func parforalloc2(nthrmax uint32) *ParFor +func parforsetup2(desc *ParFor, nthr, n uint32, ctx *byte, wait bool, body func(*ParFor, uint32)) +func parfordo(desc *ParFor) +func parforiters(desc *ParFor, tid uintptr) (uintptr, uintptr) + +var NewParFor = parforalloc2 +var ParForSetup = parforsetup2 +var ParForDo = parfordo + +func ParForIters(desc *ParFor, tid uint32) (uint32, uint32) { + begin, end := parforiters(desc, uintptr(tid)) + return uint32(begin), uint32(end) +} + +func testSchedLocalQueue() +func testSchedLocalQueueSteal() + +var TestSchedLocalQueue1 = testSchedLocalQueue +var TestSchedLocalQueueSteal1 = testSchedLocalQueueSteal -- cgit v1.2.3