diff options
Diffstat (limited to 'src/pkg/runtime/export_test.go')
-rw-r--r-- | src/pkg/runtime/export_test.go | 42 |
1 files changed, 42 insertions, 0 deletions
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 |