Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for lockSlow (0.23 sec)

  1. src/sync/mutex.go

    	if atomic.CompareAndSwapInt32(&m.state, 0, mutexLocked) {
    		if race.Enabled {
    			race.Acquire(unsafe.Pointer(m))
    		}
    		return
    	}
    	// Slow path (outlined so that the fast path can be inlined)
    	m.lockSlow()
    }
    
    // TryLock tries to lock m and reports whether it succeeded.
    //
    // Note that while correct uses of TryLock do exist, they are rare,
    // and use of TryLock is often a sign of a deeper problem
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. internal/lock/lock_windows.go

    		return ErrAlreadyLocked
    	}
    	return err
    }
    
    func lockFileEx(h syscall.Handle, flags, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) {
    	reserved := uint32(0)
    	r1, _, e1 := syscall.Syscall6(procLockFileEx.Addr(), 6, uintptr(h), uintptr(flags),
    		uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)))
    	if r1 == 0 {
    		if e1 != 0 {
    			err = error(e1)
    		} else {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed Oct 18 18:08:15 UTC 2023
    - 7.9K bytes
    - Viewed (0)
Back to top