Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for pthread_cond_timedwait_relative_np (0.38 sec)

  1. src/runtime/semasleep_test.go

    //go:build !plan9 && !windows && !js && !wasip1
    
    package runtime_test
    
    import (
    	"io"
    	"os/exec"
    	"syscall"
    	"testing"
    	"time"
    )
    
    // Issue #27250. Spurious wakeups to pthread_cond_timedwait_relative_np
    // shouldn't cause semasleep to retry with the same timeout which would
    // cause indefinite spinning.
    func TestSpuriousWakeupsNeverHangSemasleep(t *testing.T) {
    	if *flagQuick {
    		t.Skip("-quick")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 06 17:48:24 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  2. src/runtime/sys_darwin.go

    	KeepAlive(c)
    	KeepAlive(m)
    	return ret
    }
    func pthread_cond_wait_trampoline()
    
    //go:nosplit
    //go:cgo_unsafe_args
    func pthread_cond_timedwait_relative_np(c *pthreadcond, m *pthreadmutex, t *timespec) int32 {
    	ret := libcCall(unsafe.Pointer(abi.FuncPCABI0(pthread_cond_timedwait_relative_np_trampoline)), unsafe.Pointer(&c))
    	KeepAlive(c)
    	KeepAlive(m)
    	KeepAlive(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  3. src/runtime/os_darwin.go

    			return 0
    		}
    		if ns >= 0 {
    			spent := nanotime() - start
    			if spent >= ns {
    				pthread_mutex_unlock(&mp.mutex)
    				return -1
    			}
    			var t timespec
    			t.setNsec(ns - spent)
    			err := pthread_cond_timedwait_relative_np(&mp.cond, &mp.mutex, &t)
    			if err == _ETIMEDOUT {
    				pthread_mutex_unlock(&mp.mutex)
    				return -1
    			}
    		} else {
    			pthread_cond_wait(&mp.cond, &mp.mutex)
    		}
    	}
    }
    
    //go:nosplit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 11.9K bytes
    - Viewed (0)
Back to top