Imported Upstream version 4.8.1
[platform/upstream/gcc48.git] / libgo / go / runtime / export_test.go
1 // Copyright 2010 The Go Authors.  All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Export guts for testing.
6
7 package runtime
8
9 var Fadd64 = fadd64
10 var Fsub64 = fsub64
11 var Fmul64 = fmul64
12 var Fdiv64 = fdiv64
13 var F64to32 = f64to32
14 var F32to64 = f32to64
15 var Fcmp64 = fcmp64
16 var Fintto64 = fintto64
17 var F64toint = f64toint
18
19 func entersyscall()
20 func exitsyscall()
21 func golockedOSThread() bool
22
23 var Entersyscall = entersyscall
24 var Exitsyscall = exitsyscall
25 var LockedOSThread = golockedOSThread
26
27 type LFNode struct {
28         Next    *LFNode
29         Pushcnt uintptr
30 }
31
32 func lfstackpush(head *uint64, node *LFNode)
33 func lfstackpop2(head *uint64) *LFNode
34
35 var LFStackPush = lfstackpush
36 var LFStackPop = lfstackpop2
37
38 type ParFor struct {
39         body    *byte
40         done    uint32
41         Nthr    uint32
42         nthrmax uint32
43         thrseq  uint32
44         Cnt     uint32
45         Ctx     *byte
46         wait    bool
47 }
48
49 func parforalloc2(nthrmax uint32) *ParFor
50 func parforsetup2(desc *ParFor, nthr, n uint32, ctx *byte, wait bool, body func(*ParFor, uint32))
51 func parfordo(desc *ParFor)
52 func parforiters(desc *ParFor, tid uintptr) (uintptr, uintptr)
53
54 var NewParFor = parforalloc2
55 var ParForSetup = parforsetup2
56 var ParForDo = parfordo
57
58 func ParForIters(desc *ParFor, tid uint32) (uint32, uint32) {
59         begin, end := parforiters(desc, uintptr(tid))
60         return uint32(begin), uint32(end)
61 }