- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 34 for semacquire (0.76 sec)
-
src/sync/runtime.go
package sync import "unsafe" // defined in package runtime // Semacquire waits until *s > 0 and then atomically decrements it. // It is intended as a simple sleep primitive for use by the synchronization // library and should not be used directly. func runtime_Semacquire(s *uint32) // Semacquire(RW)Mutex(R) is like Semacquire, but for profiling contended // Mutexes and RWMutexes.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 16 16:32:27 UTC 2022 - 2.3K bytes - Viewed (0) -
src/runtime/sema_test.go
default: } Gosched() } }() } wg.Add(1) go func() { defer wg.Done() Semacquire(&sema) atomic.CompareAndSwapUint32(&res, 0, 1) Semrelease1(&sema, true, 0) close(done) }() for SemNwait(&sema) == 0 { Gosched() // wait for goroutine to block in Semacquire } // The crux of the test: we release the semaphore with handoff
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 21 19:37:22 UTC 2022 - 4.2K bytes - Viewed (0) -
src/runtime/sema.go
semaMutexProfile ) // Called from runtime. 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 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 19K bytes - Viewed (0) -
src/runtime/trace.go
return errorString("tracing is already enabled") } // Block until cleanup of the last trace is done. semacquire(&traceShutdownSema) semrelease(&traceShutdownSema) // Hold traceAdvanceSema across trace start, since we'll want it on // the other side of tracing being enabled globally. semacquire(&traceAdvanceSema) // Initialize CPU profile -> trace ingestion. traceInitReadCPU()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:17:41 UTC 2024 - 37.1K bytes - Viewed (0) -
src/runtime/mgc.go
if debug.gcstoptheworld == 1 { mode = gcForceMode } else if debug.gcstoptheworld == 2 { mode = gcForceBlockMode } // Ok, we're doing it! Stop everybody else semacquire(&gcsema) semacquire(&worldsema) // For stats, check if this GC was forced by the user. // Update it under gcsema to avoid gctrace getting wrong values. work.userForced = trigger.kind == gcTriggerCycle
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 62K bytes - Viewed (0) -
src/runtime/runtime2.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 47.9K bytes - Viewed (0) -
src/runtime/metrics_test.go
"runtime.semrelease1", "runtime_test.TestRuntimeLockMetricsAndProfile.func6.1", "runtime_test.(*contentionWorker).run", }, { "runtime.unlock", "runtime.semacquire1", "runtime.semacquire", "runtime_test.TestRuntimeLockMetricsAndProfile.func6.1", "runtime_test.(*contentionWorker).run", }, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 45K bytes - Viewed (0) -
src/runtime/export_test.go
var Lock = lock var Unlock = unlock var MutexContended = mutexContended func SemRootLock(addr *uint32) *mutex { root := semtable.rootFor(addr) return &root.lock } var Semacquire = semacquire var Semrelease1 = semrelease1 func SemNwait(addr *uint32) uint32 { root := semtable.rootFor(addr) return root.nwait.Load() } const SemTableSize = semTabSize
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:50:53 UTC 2024 - 46.1K bytes - Viewed (0) -
src/runtime/mprof.go
// allocation estimate without bothering to STW. As long as // this is close, then we'll only need to STW once (on the next // call). return int(gcount()), false } semacquire(&goroutineProfile.sema) ourg := getg() pcbuf := makeProfStack() // see saveg() for explanation stw := stopTheWorld(stwGoroutineProfile)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:57:37 UTC 2024 - 53.3K bytes - Viewed (0) -
src/runtime/proc.go
// goroutines. // // Returns the STW context. When starting the world, this context must be // passed to startTheWorld. func stopTheWorld(reason stwReason) worldStop { semacquire(&worldsema) gp := getg() gp.m.preemptoff = reason.String() systemstack(func() { // Mark the goroutine which called stopTheWorld preemptible so its // stack may be scanned.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 207.5K bytes - Viewed (0)