Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for LFStackPush (0.18 sec)

  1. src/runtime/lfstack_test.go

    	// Check the stack is initially empty.
    	if LFStackPop(stack) != nil {
    		t.Fatalf("stack is not empty")
    	}
    
    	// Push one element.
    	node := allocMyNode(42)
    	LFStackPush(stack, fromMyNode(node))
    
    	// Push another.
    	node = allocMyNode(43)
    	LFStackPush(stack, fromMyNode(node))
    
    	// Pop one element.
    	node = toMyNode(LFStackPop(stack))
    	if node == nil {
    		t.Fatalf("stack is empty")
    	}
    	if node.data != 43 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 17 23:12:04 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  2. src/runtime/export_test.go

    func (l LockRank) String() string {
    	return lockRank(l).String()
    }
    
    const PreemptMSupported = preemptMSupported
    
    type LFNode struct {
    	Next    uint64
    	Pushcnt uintptr
    }
    
    func LFStackPush(head *uint64, node *LFNode) {
    	(*lfstack)(head).push((*lfnode)(unsafe.Pointer(node)))
    }
    
    func LFStackPop(head *uint64) *LFNode {
    	return (*LFNode)((*lfstack)(head).pop())
    }
    func LFNodeValidate(node *LFNode) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:50:53 UTC 2024
    - 46.1K bytes
    - Viewed (0)
Back to top