Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for semacquire (0.3 sec)

  1. 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)
  2. 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)
  3. src/runtime/runtime2.go

    	waitReasonFinalizerWait                           // "finalizer wait"
    	waitReasonForceGCIdle                             // "force gc (idle)"
    	waitReasonSemacquire                              // "semacquire"
    	waitReasonSleep                                   // "sleep"
    	waitReasonSyncCondWait                            // "sync.Cond.Wait"
    	waitReasonSyncMutexLock                           // "sync.Mutex.Lock"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceWorkerLeaseTest.groovy

                    }
                }
            }
    
            then:
            instant.worker1Finished > instant.unlocked
        }
    
        def "releases worker lease when replacing locks and need to block to reacquire an old lock"() {
            def registry = workerLeaseService(1)
            def resource1 = resourceLock("one")
            def resource2 = resourceLock("two")
    
            when:
            async {
                start {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:48:02 UTC 2023
    - 13.2K bytes
    - Viewed (0)
  7. src/runtime/mgcwork.go

    	}
    
    	wbuf.nobj--
    	return wbuf.obj[wbuf.nobj]
    }
    
    // dispose returns any cached pointers to the global queue.
    // The buffers are being put on the full queue so that the
    // write barriers will not simply reacquire them before the
    // GC can inspect them. This helps reduce the mutator's
    // ability to hide pointers during the concurrent mark phase.
    //
    //go:nowritebarrierrec
    func (w *gcWork) dispose() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 12.9K bytes
    - Viewed (0)
  8. platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceProjectLockTest.groovy

                assert lockIsHeld(taskLease)
                assert lockIsHeld(projectLock)
            }
            !lockIsHeld(taskLease)
            !lockIsHeld(projectLock)
        }
    
        def "can release and reacquire project lock while holding task execution lease"() {
            def workerLeaseService = workerLeaseService(false)
            def taskLease = workerLeaseService.getTaskExecutionLock(path("build"), path("project"))
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 05 16:29:26 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  9. src/runtime/metrics.go

    }
    
    func metricsLock() {
    	// Acquire the metricsSema but with handoff. Operations are typically
    	// expensive enough that queueing up goroutines and handing off between
    	// them will be noticeably better-behaved.
    	semacquire1(&metricsSema, true, 0, 0, waitReasonSemacquire)
    	if raceenabled {
    		raceacquire(unsafe.Pointer(&metricsSema))
    	}
    }
    
    func metricsUnlock() {
    	if raceenabled {
    		racerelease(unsafe.Pointer(&metricsSema))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 21:03:13 UTC 2024
    - 26K bytes
    - Viewed (0)
  10. src/runtime/traceruntime.go

    // true in the following cases:
    // - The goroutine lost its P, it ran some other code, and then got it back. It's now running with that P.
    // - The goroutine lost its P and was unable to reacquire it, and is now running without a P.
    // - The goroutine lost its P and acquired a different one, and is now running with that P.
    func (tl traceLocker) GoSysExit(lostP bool) {
    	ev := traceEvGoSyscallEnd
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 25.7K bytes
    - Viewed (0)
Back to top