Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 59 for Setg (0.05 sec)

  1. src/runtime/os_linux.go

    	// procid. We need this for asynchronous preemption and it's
    	// useful in debuggers.
    	getg().m.procid = uint64(gettid())
    }
    
    // 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
    - 25.9K bytes
    - Viewed (0)
  2. src/runtime/os_freebsd.go

    	// FreeBSD users are running a patched kernel. See issue #15658.
    	if gp := getg(); !isarchive && !islibrary && gp.m == &m0 && gp == gp.m.g0 {
    		st := stackt{ss_flags: _SS_DISABLE}
    		sigaltstack(&st, nil)
    	}
    
    	minitSignals()
    }
    
    // Called from dropm to undo the effect of an minit.
    //
    //go:nosplit
    func unminit() {
    	unminitSignals()
    	getg().m.procid = 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  3. src/runtime/os3_solaris.go

    func minit() {
    	asmcgocall(unsafe.Pointer(abi.FuncPCABI0(miniterrno)), unsafe.Pointer(&libc____errno))
    
    	minitSignals()
    
    	getg().m.procid = uint64(pthread_self())
    }
    
    // Called from dropm to undo the effect of an minit.
    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
    - 17.6K bytes
    - Viewed (0)
  4. src/runtime/time.go

    	if t.ts != nil {
    		assertLockHeld(&t.ts.mu)
    	}
    	if raceenabled {
    		// Note that we are running on a system stack,
    		// so there is no chance of getg().m being reassigned
    		// out from under us while this function executes.
    		tsLocal := &getg().m.p.ptr().timers
    		if tsLocal.raceCtx == 0 {
    			tsLocal.raceCtx = racegostart(abi.FuncPCABIInternal((*timers).run) + sys.PCQuantum)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  5. src/runtime/sema.go

    func semacquire(addr *uint32) {
    	semacquire1(addr, false, 0, 0, waitReasonSemacquire)
    }
    
    func semacquire1(addr *uint32, lifo bool, profile semaProfileFlags, skipframes int, reason waitReason) {
    	gp := getg()
    	if gp != gp.m.curg {
    		throw("semacquire not on the G stack")
    	}
    
    	// Easy case.
    	if cansemacquire(addr) {
    		return
    	}
    
    	// Harder case:
    	//	increment waiter count
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 19K bytes
    - Viewed (0)
  6. src/runtime/os_netbsd.go

    		return int(osrev)
    	}
    	return 0
    }
    
    //go:nosplit
    func semacreate(mp *m) {
    }
    
    //go:nosplit
    func semasleep(ns int64) int32 {
    	gp := getg()
    	var deadline int64
    	if ns >= 0 {
    		deadline = nanotime() + ns
    	}
    
    	for {
    		v := atomic.Load(&gp.m.waitsemacount)
    		if v > 0 {
    			if atomic.Cas(&gp.m.waitsemacount, v, v-1) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  7. src/runtime/runtime1.go

    	}
    	return res
    }
    
    // Helpers for Go. Must be NOSPLIT, must only call NOSPLIT functions, and must not block.
    
    //go:nosplit
    func acquirem() *m {
    	gp := getg()
    	gp.m.locks++
    	return gp.m
    }
    
    //go:nosplit
    func releasem(mp *m) {
    	gp := getg()
    	mp.locks--
    	if mp.locks == 0 && gp.preempt {
    		// restore the preemption request in case we've cleared it in newstack
    		gp.stackguard0 = stackPreempt
    	}
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  8. src/runtime/cgocall.go

    		throw("cgocall unavailable")
    	}
    
    	if fn == nil {
    		throw("cgocall nil")
    	}
    
    	if raceenabled {
    		racereleasemerge(unsafe.Pointer(&racecgosync))
    	}
    
    	mp := getg().m
    	mp.ncgocall++
    
    	// Reset traceback.
    	mp.cgoCallers[0] = 0
    
    	// Announce we are entering a system call
    	// so that the scheduler knows to create another
    	// M to run goroutines while we are in the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  9. src/runtime/mgcsweep.go

    	//
    	// If the scavenger isn't already awake, wake it up. There's
    	// definitely work for it to do at this point.
    	scavenger.wake()
    
    	nextMarkBitArenaEpoch()
    }
    
    func bgsweep(c chan int) {
    	sweep.g = getg()
    
    	lockInit(&sweep.lock, lockRankSweep)
    	lock(&sweep.lock)
    	sweep.parked = true
    	c <- 1
    	goparkunlock(&sweep.lock, waitReasonGCSweepWait, traceBlockGCSweep, 1)
    
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:52:18 UTC 2024
    - 32.9K bytes
    - Viewed (0)
  10. src/runtime/mgcwork.go

    // A gcWork provides the interface to produce and consume work for the
    // garbage collector.
    //
    // A gcWork can be used on the stack as follows:
    //
    //	(preemption must be disabled)
    //	gcw := &getg().m.p.ptr().gcw
    //	.. call gcw.put() to produce and gcw.tryGet() to consume ..
    //
    // It's important that any use of gcWork during the mark phase prevent
    // the garbage collector from transitioning to mark termination since
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 12.9K bytes
    - Viewed (0)
Back to top