Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for popTail (0.14 sec)

  1. src/sync/export_test.go

    	return d.popHead()
    }
    
    func (d *poolDequeue) PopTail() (any, bool) {
    	return d.popTail()
    }
    
    func NewPoolChain() PoolDequeue {
    	return new(poolChain)
    }
    
    func (c *poolChain) PushHead(val any) bool {
    	c.pushHead(val)
    	return true
    }
    
    func (c *poolChain) PopHead() (any, bool) {
    	return c.popHead()
    }
    
    func (c *poolChain) PopTail() (any, bool) {
    	return c.popTail()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 17 16:39:52 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. src/sync/poolqueue.go

    		val = nil
    	}
    	// Zero the slot. Unlike popTail, this isn't racing with
    	// pushHead, so we don't need to be careful here.
    	*slot = eface{}
    	return val, true
    }
    
    // popTail removes and returns the element at the tail of the queue.
    // It returns false if the queue is empty. It may be called by any
    // number of consumers.
    func (d *poolDequeue) popTail() (any, bool) {
    	var slot *eface
    	for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 18:12:29 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. src/sync/pool.go

    	New func() any
    }
    
    // Local per-P Pool appendix.
    type poolLocalInternal struct {
    	private any       // Can be used only by the respective P.
    	shared  poolChain // Local P can pushHead/popHead; any P can popTail.
    }
    
    type poolLocal struct {
    	poolLocalInternal
    
    	// Prevents false sharing on widespread platforms with
    	// 128 mod (cache line size) = 0 .
    	pad [128 - unsafe.Sizeof(poolLocalInternal{})%128]byte
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 9.4K bytes
    - Viewed (0)
  4. src/sync/pool_test.go

    			atomic.StoreInt32(&stop, 1)
    		}
    	}
    
    	// Start P-1 consumers.
    	for i := 1; i < P; i++ {
    		wg.Add(1)
    		go func() {
    			fail := 0
    			for atomic.LoadInt32(&stop) == 0 {
    				val, ok := d.PopTail()
    				if ok {
    					fail = 0
    					record(val.(int))
    				} else {
    					// Speed up the test by
    					// allowing the pusher to run.
    					if fail++; fail%100 == 0 {
    						runtime.Gosched()
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8K bytes
    - Viewed (0)
  5. src/runtime/sys_netbsd_386.s

    	CALL	lwp_setprivate<>(SB)
    	POPL	AX
    	POPAL
    
    	// Now segment is established. Initialize m, g.
    	get_tls(AX)
    	MOVL	DX, g(AX)
    	MOVL	BX, g_m(DX)
    
    	CALL	runtime·stackcheck(SB)	// smashes AX, CX
    	MOVL	0(DX), DX		// paranoia; check they are not nil
    	MOVL	0(BX), BX
    
    	// more paranoia; check that stack splitting code works
    	PUSHAL
    	CALL	runtime·emptyfunc(SB)
    	POPAL
    
    	// Call fn
    	CALL	SI
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 9.6K bytes
    - Viewed (0)
  6. src/runtime/sys_linux_386.s

    	POPL	AX
    	POPL	AX
    	POPL	AX
    	POPAL
    
    	// Now segment is established. Initialize m, g.
    	get_tls(AX)
    	MOVL	DX, g(AX)
    	MOVL	BX, g_m(DX)
    
    	CALL	runtime·stackcheck(SB)	// smashes AX, CX
    	MOVL	0(DX), DX	// paranoia; check they are not nil
    	MOVL	0(BX), BX
    
    	// more paranoia; check that stack splitting code works
    	PUSHAL
    	CALL	runtime·emptyfunc(SB)
    	POPAL
    
    nog:
    	CALL	SI	// fn()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 24 18:53:44 UTC 2023
    - 17.9K bytes
    - Viewed (0)
  7. src/runtime/sys_freebsd_386.s

    	MOVL	4(SP), AX // m
    	MOVL	m_g0(AX), BX
    	LEAL	m_tls(AX), BP
    	MOVL	m_id(AX), DI
    	ADDL	$7, DI
    	PUSHAL
    	PUSHL	$32
    	PUSHL	BP
    	PUSHL	DI
    	CALL	runtime·setldt(SB)
    	POPL	AX
    	POPL	AX
    	POPL	AX
    	POPAL
    	get_tls(CX)
    	MOVL	BX, g(CX)
    
    	MOVL	AX, g_m(BX)
    	CALL	runtime·stackcheck(SB)		// smashes AX
    	CALL	runtime·mstart(SB)
    
    	MOVL	0, AX			// crash (not reached)
    
    // Exit the entire program (like C exit)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 9.4K bytes
    - Viewed (0)
  8. src/cmd/internal/obj/x86/anames.go

    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 18:32:50 UTC 2023
    - 19.1K bytes
    - Viewed (0)
Back to top