diff options
Diffstat (limited to 'Godeps/_workspace/src/github.com/obscuren/qml/cdata')
6 files changed, 0 insertions, 118 deletions
diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata.go b/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata.go deleted file mode 100644 index 6f13b810f..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Package cdata supports the implementation of the qml package. -package cdata - -func Ref() uintptr - -func Addrs() (uintptr, uintptr) diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata12.c b/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata12.c deleted file mode 100644 index 2e60abfa2..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata12.c +++ /dev/null @@ -1,18 +0,0 @@ -// +build !go1.4 - -#include "runtime.h" - -void ·Ref(uintptr ref) { - ref = (uintptr)g->m; - FLUSH(&ref); -} - -void runtime·main(void); -void main·main(void); - -void ·Addrs(uintptr rmain, uintptr mmain) { - rmain = (uintptr)runtime·main; - mmain = (uintptr)main·main; - FLUSH(&rmain); - FLUSH(&mmain); -} diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_386.s b/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_386.s deleted file mode 100644 index 7dae9b961..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_386.s +++ /dev/null @@ -1,17 +0,0 @@ -// +build go1.4 - -#include "textflag.h" - -TEXT ·Ref(SB),NOSPLIT,$4-4 - CALL runtime·acquirem(SB) - MOVL 0(SP), AX - MOVL AX, ret+0(FP) - CALL runtime·releasem(SB) - RET - -TEXT ·Addrs(SB),NOSPLIT,$0-8 - MOVL $runtime·main(SB), AX - MOVL AX, ret+0(FP) - MOVL $runtime·main_main(SB), AX - MOVL AX, ret+8(FP) - RET diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_amd64.s b/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_amd64.s deleted file mode 100644 index 83cc22c9c..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_amd64.s +++ /dev/null @@ -1,17 +0,0 @@ -// +build go1.4 - -#include "textflag.h" - -TEXT ·Ref(SB),NOSPLIT,$8-8 - CALL runtime·acquirem(SB) - MOVQ 0(SP), AX - MOVQ AX, ret+0(FP) - CALL runtime·releasem(SB) - RET - -TEXT ·Addrs(SB),NOSPLIT,$0-16 - MOVQ $runtime·main(SB), AX - MOVQ AX, ret+0(FP) - MOVQ $runtime·main_main(SB), AX - MOVQ AX, ret+8(FP) - RET diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_arm.s b/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_arm.s deleted file mode 100644 index c66bbafbf..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata14_arm.s +++ /dev/null @@ -1,18 +0,0 @@ -// +build go1.4 - -#include "textflag.h" - -TEXT ·Ref(SB),NOSPLIT,$4-4 - BL runtime·acquirem(SB) - MOVW 4(R13), R0 - MOVW R0, ret+0(FP) - MOVW R0, 4(R13) - BL runtime·releasem(SB) - RET - -TEXT ·Addrs(SB),NOSPLIT,$0-8 - MOVW $runtime·main(SB), R0 - MOVW R0, ret+0(FP) - MOVW $runtime·main_main(SB), R0 - MOVW R0, ret+4(FP) - RET diff --git a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata_test.go b/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata_test.go deleted file mode 100644 index e7c3f33c5..000000000 --- a/Godeps/_workspace/src/github.com/obscuren/qml/cdata/cdata_test.go +++ /dev/null @@ -1,42 +0,0 @@ -package cdata - -import ( - "runtime" - "sync" - "testing" -) - -type refPair struct { - ref1, ref2 uintptr -} - -func TestRef(t *testing.T) { - const N = 10 - runtime.LockOSThread() - exit := sync.WaitGroup{} - exit.Add(1) - defer exit.Done() - wg := sync.WaitGroup{} - wg.Add(N) - ch := make(chan refPair) - for i := 0; i < N; i++ { - go func() { - runtime.LockOSThread() - wg.Done() - ch <- refPair{Ref(), Ref()} - exit.Wait() - }() - } - wg.Wait() - refs := make(map[uintptr]bool) - for i := 0; i < N; i++ { - pair := <-ch - if pair.ref1 != pair.ref2 { - t.Fatalf("found inconsistent ref: %d != %d", pair.ref1, pair.ref2) - } - if refs[pair.ref1] { - t.Fatalf("found duplicated ref: %d", pair.ref1) - } - refs[pair.ref1] = true - } -} |