Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 102 for getg (0.2 sec)

  1. src/runtime/os_wasm.go

    	"unsafe"
    )
    
    func osinit() {
    	// https://webassembly.github.io/spec/core/exec/runtime.html#memory-instances
    	physPageSize = 64 * 1024
    	initBloc()
    	ncpu = 1
    	getg().m.procid = 2
    }
    
    const _SIGSEGV = 0xb
    
    func sigpanic() {
    	gp := getg()
    	if !canpanic() {
    		throw("unexpected signal during runtime execution")
    	}
    
    	// js only invokes the exception handler for memory faults.
    	gp.sig = _SIGSEGV
    	panicmem()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  2. src/runtime/debug.go

    //
    // Ensure mayMoreStackPreempt can be called for all ABIs.
    //
    //go:nosplit
    //go:linkname mayMoreStackPreempt
    func mayMoreStackPreempt() {
    	// Don't do anything on the g0 or gsignal stack.
    	gp := getg()
    	if gp == gp.m.g0 || gp == gp.m.gsignal {
    		return
    	}
    	// Force a preemption, unless the stack is already poisoned.
    	if gp.stackguard0 < stackPoisonMin {
    		gp.stackguard0 = stackPreempt
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 20:38:24 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  3. src/runtime/os_openbsd.go

    // Called to initialize a new m (including the bootstrap m).
    // Called on the new thread, can not allocate memory.
    func minit() {
    	getg().m.procid = uint64(getthrid())
    	minitSignals()
    }
    
    // Called from dropm to undo the effect of an minit.
    //
    //go:nosplit
    func unminit() {
    	unminitSignals()
    	getg().m.procid = 0
    }
    
    // Called from exitm, but not from drop, to undo the effect of thread-owned
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  4. src/runtime/os3_plan9.go

    	"internal/goarch"
    	"internal/stringslite"
    	"unsafe"
    )
    
    // May run during STW, so write barriers are not allowed.
    //
    //go:nowritebarrierrec
    func sighandler(_ureg *ureg, note *byte, gp *g) int {
    	gsignal := getg()
    	mp := gsignal.m
    
    	var t sigTabT
    	var docrash bool
    	var sig int
    	var flags int
    	var level int32
    
    	c := &sigctxt{_ureg}
    	notestr := gostringnocopy(note)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 4K bytes
    - Viewed (0)
  5. src/runtime/msan.go

    // anyhow for values on the stack. Just ignore msanread when running
    // on the system stack. The other msan functions are fine.
    //
    //go:linkname msanread
    //go:nosplit
    func msanread(addr unsafe.Pointer, sz uintptr) {
    	gp := getg()
    	if gp == nil || gp.m == nil || gp == gp.m.g0 || gp == gp.m.gsignal {
    		return
    	}
    	domsanread(addr, sz)
    }
    
    //go:noescape
    func domsanread(addr unsafe.Pointer, sz uintptr)
    
    //go:linkname msanwrite
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 20:50:21 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  6. src/runtime/rwmutex.go

    			lock(&rw.rLock)
    			if rw.readerPass > 0 {
    				// Writer finished.
    				rw.readerPass -= 1
    				unlock(&rw.rLock)
    			} else {
    				// Queue this reader to be woken by
    				// the writer.
    				m := getg().m
    				m.schedlink = rw.readers
    				rw.readers.set(m)
    				unlock(&rw.rLock)
    				notesleep(&m.park)
    				noteclear(&m.park)
    			}
    		})
    	}
    }
    
    // runlock undoes a single rlock call on rw.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 5K bytes
    - Viewed (0)
  7. src/runtime/atomic_pointer.go

    // See go.dev/issue/67401.
    //
    //go:linkname atomicwb
    //go:nosplit
    func atomicwb(ptr *unsafe.Pointer, new unsafe.Pointer) {
    	slot := (*uintptr)(unsafe.Pointer(ptr))
    	buf := getg().m.p.ptr().wbBuf.get2()
    	buf[0] = *slot
    	buf[1] = uintptr(new)
    }
    
    // atomicstorep performs *ptr = new atomically and invokes a write barrier.
    //
    //go:nosplit
    func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. src/runtime/mcheckmark.go

    		print("runtime: found obj at *(", hex(base), "+", hex(off), ")\n")
    
    		// Dump the source (base) object
    		gcDumpObject("base", base, off)
    
    		// Dump the object
    		gcDumpObject("obj", obj, ^uintptr(0))
    
    		getg().m.traceback = 2
    		throw("checkmark found unmarked object")
    	}
    
    	ai := arenaIndex(obj)
    	arena := mheap_.arenas[ai.l1()][ai.l2()]
    	arenaWord := (obj / heapArenaBytes / 8) % uintptr(len(arena.checkmarks.b))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  9. src/runtime/cgo.go

    // so it emits the test and keeps the call, giving the desired
    // escape analysis result. The test is cheaper than the call.
    var cgoAlwaysFalse bool
    
    var cgo_yield = &_cgo_yield
    
    func cgoNoCallback(v bool) {
    	g := getg()
    	if g.nocgocallback && v {
    		panic("runtime: unexpected setting cgoNoCallback")
    	}
    	g.nocgocallback = v
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. src/internal/trace/testdata/testprog/cpu-profile.go

    	}
    	// Examine the CPU profiler's view. Filter it to only include samples from
    	// the single test goroutine. Use labels to execute that filter: they should
    	// apply to all work done while that goroutine is getg().m.curg, and they
    	// should apply to no other goroutines.
    	pprofStacks := make(map[string]int)
    	for _, s := range prof.Sample {
    		if s.Label["tracing"] != nil {
    			var fns []string
    			var leaf string
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top