Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for notesleep (0.38 sec)

  1. src/runtime/lock_wasip1.go

    	}
    	n.key = 1
    }
    
    func notesleep(n *note) {
    	throw("notesleep not supported by wasi")
    }
    
    func notetsleep(n *note, ns int64) bool {
    	throw("notetsleep not supported by wasi")
    	return false
    }
    
    // same as runtimeĀ·notetsleep, but called on user g (not g0)
    func notetsleepg(n *note, ns int64) bool {
    	gp := getg()
    	if gp == gp.m.g0 {
    		throw("notetsleepg on g0")
    	}
    
    	deadline := nanotime() + ns
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 2K bytes
    - Viewed (0)
  2. src/runtime/lock_futex.go

    	return atomic.Load(key32(&n.key)) != 0
    }
    
    func notetsleep(n *note, ns int64) bool {
    	gp := getg()
    	if gp != gp.m.g0 && gp.m.preemptoff != "" {
    		throw("notetsleep not on g0")
    	}
    
    	return notetsleep_internal(n, ns)
    }
    
    // same as runtimeĀ·notetsleep, but called on user g (not g0)
    // calls only nosplit functions between entersyscallblock/exitsyscall.
    func notetsleepg(n *note, ns int64) bool {
    	gp := getg()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:34 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  3. src/runtime/lock_sema.go

    		semawakeup((*m)(unsafe.Pointer(v)))
    	}
    }
    
    func notesleep(n *note) {
    	gp := getg()
    	if gp != gp.m.g0 {
    		throw("notesleep not on g0")
    	}
    	semacreate(gp.m)
    	if !atomic.Casuintptr(&n.key, 0, uintptr(unsafe.Pointer(gp.m))) {
    		// Must be locked (got wakeup).
    		if n.key != locked {
    			throw("notesleep - waitm out of sync")
    		}
    		return
    	}
    	// Queued. Sleep.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  4. src/runtime/lock_js.go

    		goready(notes[n], 1)
    	}
    }
    
    func notesleep(n *note) {
    	throw("notesleep not supported by js")
    }
    
    func notetsleep(n *note, ns int64) bool {
    	throw("notetsleep not supported by js")
    	return false
    }
    
    // same as runtimeĀ·notetsleep, but called on user g (not g0)
    func notetsleepg(n *note, ns int64) bool {
    	gp := getg()
    	if gp == gp.m.g0 {
    		throw("notetsleepg on g0")
    	}
    
    	if ns >= 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 21:02:20 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  5. src/runtime/rwmutex.go

    				unlock(&rw.rLock)
    			} else {
    				// Queue this reader to be woken by
    				// the writer.
    				m := getg().m
    				m.schedlink = rw.readers
    				rw.readers.set(m)
    				unlock(&rw.rLock)
    				notesleep(&m.park)
    				noteclear(&m.park)
    			}
    		})
    	}
    }
    
    // runlock undoes a single rlock call on rw.
    func (rw *rwmutex) runlock() {
    	if r := rw.readerCount.Add(-1); r < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 5K bytes
    - Viewed (0)
  6. src/runtime/netpoll_stub.go

    		// the note. It should normally be completely uncontended.
    		lock(&netpollStubLock)
    
    		lock(&netpollBrokenLock)
    		noteclear(&netpollNote)
    		netpollBroken = false
    		unlock(&netpollBrokenLock)
    
    		notetsleep(&netpollNote, delay)
    		unlock(&netpollStubLock)
    		// Guard against starvation in case the lock is contended
    		// (eg when running TestNetpollBreak).
    		osyield()
    	}
    	return gList{}, 0
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  7. src/runtime/export_debug_test.go

    	for i := 0; ; i++ {
    		testSigtrap = h.inject
    		noteclear(&h.done)
    		h.err = ""
    
    		if err := tkill(tid); err != nil {
    			return nil, err
    		}
    		// Wait for completion.
    		notetsleepg(&h.done, -1)
    		if h.err != "" {
    			switch h.err {
    			case "call not at safe point":
    				if returnOnUnsafePoint {
    					// This is for TestDebugCallUnsafePoint.
    					return nil, h.err
    				}
    				fallthrough
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  8. src/runtime/sigqueue.go

    			case sigIdle:
    				if sig.state.CompareAndSwap(sigIdle, sigReceiving) {
    					if GOOS == "darwin" || GOOS == "ios" {
    						sigNoteSleep(&sig.note)
    						break Receive
    					}
    					notetsleepg(&sig.note, -1)
    					noteclear(&sig.note)
    					break Receive
    				}
    			case sigSending:
    				if sig.state.CompareAndSwap(sigSending, sigIdle) {
    					break Receive
    				}
    			}
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
Back to top