Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for acquireSudog (0.71 sec)

  1. src/runtime/sema.go

    	}
    
    	// Harder case:
    	//	increment waiter count
    	//	try cansemacquire one more time, return if succeeded
    	//	enqueue itself as a waiter
    	//	sleep
    	//	(waiter descriptor is dequeued by signaler)
    	s := acquireSudog()
    	root := semtable.rootFor(addr)
    	t0 := int64(0)
    	s.releasetime = 0
    	s.acquiretime = 0
    	s.ticket = 0
    	if profile&semaBlockProfile != 0 && blockprofilerate > 0 {
    		t0 = cputicks()
    		s.releasetime = -1
    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/chan.go

    		unlock(&c.lock)
    		return true
    	}
    
    	if !block {
    		unlock(&c.lock)
    		return false
    	}
    
    	// Block on the channel. Some receiver will complete our operation for us.
    	gp := getg()
    	mysg := acquireSudog()
    	mysg.releasetime = 0
    	if t0 != 0 {
    		mysg.releasetime = -1
    	}
    	// No stack splits between assigning elem and enqueuing mysg
    	// on gp.waiting where copystack can find it.
    	mysg.elem = ep
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  3. src/runtime/select.go

    	gp = getg()
    	if gp.waiting != nil {
    		throw("gp.waiting != nil")
    	}
    	nextp = &gp.waiting
    	for _, casei := range lockorder {
    		casi = int(casei)
    		cas = &scases[casi]
    		c = cas.c
    		sg := acquireSudog()
    		sg.g = gp
    		sg.isSelect = true
    		// No stack splits between assigning elem and enqueuing
    		// sg on gp.waiting where copystack can find it.
    		sg.elem = cas.elem
    		sg.releasetime = 0
    		if t0 != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K bytes
    - Viewed (0)
  4. src/runtime/runtime2.go

    // many sudogs for one g; and many gs may be waiting on the same
    // synchronization object, so there may be many sudogs for one object.
    //
    // sudogs are allocated from a special pool. Use acquireSudog and
    // releaseSudog to allocate and free them.
    type sudog struct {
    	// The following fields are protected by the hchan.lock of the
    	// channel this sudog is blocking on. shrinkstack depends on
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
  5. src/runtime/export_test.go

    type SemTable struct {
    	semTable
    }
    
    // Enqueue simulates enqueuing a waiter for a semaphore (or lock) at addr.
    func (t *SemTable) Enqueue(addr *uint32) {
    	s := acquireSudog()
    	s.releasetime = 0
    	s.acquiretime = 0
    	s.ticket = 0
    	t.semTable.rootFor(addr).queue(addr, s, false)
    }
    
    // Dequeue simulates dequeuing a waiter for a semaphore (or lock) at addr.
    //
    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. src/runtime/proc.go

    //
    //go:linkname goready
    func goready(gp *g, traceskip int) {
    	systemstack(func() {
    		ready(gp, traceskip, true)
    	})
    }
    
    //go:nosplit
    func acquireSudog() *sudog {
    	// Delicate dance: the semaphore implementation calls
    	// acquireSudog, acquireSudog calls new(sudog),
    	// new calls malloc, malloc can call the garbage collector,
    	// and the garbage collector calls the semaphore implementation
    	// in stopTheWorld.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
Back to top