Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 44 for cgocallbackg (0.16 sec)

  1. src/runtime/stubs.go

    	return (*T)(unsafe.Pointer(x ^ 0))
    }
    
    // Not all cgocallback frames are actually cgocallback,
    // so not all have these arguments. Mark them uintptr so that the GC
    // does not misinterpret memory when the arguments are not present.
    // cgocallback is not called from Go, only from crosscall2.
    // This in turn calls cgocallbackg, which is where we'll find
    // pointer-declared arguments.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 20.2K bytes
    - Viewed (0)
  2. src/runtime/asm_amd64.s

    // unset since we're in Go code.
    GLOBL zeroTLS<>(SB),RODATA,$const_tlsSize
    #endif
    
    // func cgocallback(fn, frame unsafe.Pointer, ctxt uintptr)
    // See cgocall.go for more details.
    TEXT ยทcgocallback(SB),NOSPLIT,$24-24
    	NO_LOCAL_POINTERS
    
    	// Skip cgocallbackg, just dropm when fn is nil, and frame is the saved g.
    	// It is used to dropm while thread is exiting.
    	MOVQ	fn+0(FP), AX
    	CMPQ	AX, $0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 20:38:24 UTC 2024
    - 60.4K bytes
    - Viewed (0)
  3. src/runtime/cgocallback.go

    Brad Fitzpatrick <******@****.***> 1456873066 +0000
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 23:34:33 UTC 2016
    - 317 bytes
    - Viewed (0)
  4. src/runtime/race/output_test.go

    typedef struct cb {
            int foo;
    } cb;
    extern void goCallback();
    static inline void *threadFunc(void *p) {
    	goCallback();
    	return 0;
    }
    static inline void startThread(cb* c) {
    	pthread_t th;
    	pthread_create(&th, 0, threadFunc, 0);
    }
    */
    import "C"
    
    var done chan bool
    var racy int
    
    //export goCallback
    func goCallback() {
    	racy++
    	done <- true
    }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 25 20:44:25 UTC 2023
    - 9.3K bytes
    - Viewed (0)
  5. src/runtime/proc.go

    var runtime_inittasks []*initTask
    
    // main_init_done is a signal used by cgocallbackg that initialization
    // has been completed. It is made before _cgo_notify_runtime_init_done,
    // so all cgo calls can rely on it existing. When main_init is complete,
    // it is closed, meaning cgocallbackg can reliably receive from it.
    var main_init_done chan bool
    
    //go:linkname main_main main.main
    func main_main()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/test/callback.go

    		// The exact function names are not going to be the same.
    		t.Skip("skipping for non-gc toolchain")
    	}
    	pc := make([]uintptr, 100)
    	n := 0
    	name := []string{
    		"runtime.cgocallbackg1",
    		"runtime.cgocallbackg",
    		"runtime.cgocallback",
    		"runtime.systemstack_switch",
    		"runtime.cgocall",
    		"test._Cfunc_callback",
    		"test.nestedCall.func1",
    		"test.nestedCall",
    		"test.testCallbackCallers",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 111.5K bytes
    - Viewed (0)
  7. src/runtime/cgo/gcc_libinit.c

    		// until they have been, because that is where a call to
    		// SetCgoTraceback is likely to occur. We are going to wait for Go
    		// initialization to be complete anyhow, later, by waiting for
    		// main_init_done to be closed in cgocallbackg1. We should wait here
    		// instead. See also issue #15943.
    		pfn = __atomic_load_n(&cgo_context_function, __ATOMIC_CONSUME);
    
    		__atomic_store_n(&runtime_init_done, done, __ATOMIC_RELEASE);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 01:07:18 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  8. src/runtime/cgo/asm_arm.s

    TEXT crosscall2_trampoline<>(SB),NOSPLIT,$0-0
    	JMP	crosscall2(SB)
    
    // Called by C code generated by cmd/cgo.
    // func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr)
    // Saves C callee-saved registers and calls cgocallback with three arguments.
    // fn is the PC of a func(a unsafe.Pointer) function.
    TEXT crosscall2(SB),NOSPLIT|NOFRAME,$0
    	SUB	$(8*9), R13 // Reserve space for the floating point registers.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 17:19:36 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  9. src/runtime/testdata/testprogcgo/callback.go

        pthread_join(th, 0);
    }
    */
    import "C"
    
    import (
    	"fmt"
    	"os"
    	"runtime"
    	"sync/atomic"
    	_ "unsafe" // for go:linkname
    )
    
    func init() {
    	register("CgoCallbackGC", CgoCallbackGC)
    }
    
    //export go_callback
    func go_callback() {
    	if e := extraMInUse.Load(); e == 0 {
    		fmt.Printf("in callback extraMInUse got %d want >0\n", e)
    		os.Exit(1)
    	}
    
    	runtime.GC()
    	grow()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 01 14:05:01 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/swig/testdata/callback/main.go

    	case "Callback":
    		testCallback()
    	}
    	println("OK")
    }
    
    func fatal(f string, args ...any) {
    	fmt.Fprintln(os.Stderr, fmt.Sprintf(f, args...))
    	os.Exit(1)
    }
    
    type GoCallback struct{}
    
    func (p *GoCallback) Run() string {
    	return "GoCallback.Run"
    }
    
    func testCall() {
    	c := NewCaller()
    	cb := NewCallback()
    
    	c.SetCallback(cb)
    	s := c.Call()
    	if s != "Callback::run" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:07 UTC 2023
    - 1K bytes
    - Viewed (0)
Back to top