Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for testThreadLockFunc (0.17 sec)

  1. src/cmd/cgo/internal/test/cgo_thread_lock.go

    	return tid1 == syscall(SYS_gettid);
    }
    */
    import "C"
    
    import (
    	"runtime"
    	"testing"
    	"time"
    )
    
    //export Gosched
    func Gosched() {
    	runtime.Gosched()
    }
    
    func init() {
    	testThreadLockFunc = testThreadLock
    }
    
    func testThreadLock(t *testing.T) {
    	stop := make(chan int)
    	go func() {
    		// We need the G continue running,
    		// so the M has a chance to run this G.
    		for {
    			select {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 18 16:55:07 UTC 2023
    - 939 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/cgo_test.go

    func TestReturnAfterGrowFromGo(t *testing.T) { testReturnAfterGrowFromGo(t) }
    func TestSetEnv(t *testing.T)                { testSetEnv(t) }
    func TestThreadLock(t *testing.T)            { testThreadLockFunc(t) }
    func TestUnsignedInt(t *testing.T)           { testUnsignedInt(t) }
    func TestZeroArgCallback(t *testing.T)       { testZeroArgCallback(t) }
    
    func BenchmarkCgoCall(b *testing.B)      { benchCgoCall(b) }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/test/test.go

    func sliceOperands(array [2000]int) {
    	_ = array[C.KILO:C.KILO:C.KILO] // no type error
    }
    
    // set in cgo_thread_lock.go init
    var testThreadLockFunc = func(*testing.T) {}
    
    // complex alignment
    
    func TestComplexAlign(t *testing.T) {
    	if C.cplxAlign.x != 3.14 {
    		t.Errorf("got %v, expected 3.14", C.cplxAlign.x)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 48.5K bytes
    - Viewed (0)
Back to top