Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for lockOSThreadC (0.1 sec)

  1. src/cmd/cgo/internal/test/testx.c

    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    #include "_cgo_export.h"
    
    void lockOSThreadC(void) {
    	lockOSThreadCallback();
    }
    
    void issue7978c(uint32_t *sync) {
    	while(__atomic_load_n(sync, __ATOMIC_SEQ_CST) != 0)
    		;
    	__atomic_add_fetch(sync, 1, __ATOMIC_SEQ_CST);
    	while(__atomic_load_n(sync, __ATOMIC_SEQ_CST) != 2)
    		;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 582 bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/testx.go

    	// there are two levels of internal runtime lock
    	// (1 for init, 1 for cgo).
    	// This would have been broken by CL 11663043.
    	C.lockOSThreadC()
    }
    
    func test3775(t *testing.T) {
    	if runtime.GOOS == "android" {
    		return
    	}
    	// Used to panic because of the UnlockOSThread below.
    	C.lockOSThreadC()
    }
    
    //export lockOSThreadCallback
    func lockOSThreadCallback() {
    	runtime.LockOSThread()
    	runtime.UnlockOSThread()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 10.6K bytes
    - Viewed (0)
Back to top