- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 49 for lockOSThread (3.68 sec)
-
src/cmd/cgo/internal/test/issue9400_linux.go
// Start signaller atomic.StoreInt32(&issue9400.Baton, 0) go func() { // Wait for RewindAndSetgid for atomic.LoadInt32(&issue9400.Baton) == 0 { runtime.Gosched() } // Broadcast SIGSETXID runtime.LockOSThread() C.setgid(0) // Indicate that signalling is done atomic.StoreInt32(&issue9400.Baton, 0) }() // Grow the stack and put down a test pattern const pattern = 0x123456789abcdef
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 18 19:55:29 UTC 2023 - 1.7K bytes - Viewed (0) -
src/runtime/export_unix_test.go
// the ID of the M the SIGUSR1 was received on. If the caller writes // a non-zero byte to w, WaitForSigusr1 returns immediately with -1, -1. func WaitForSigusr1(r, w int32, ready func(mp *M)) (int64, int64) { lockOSThread() // Make sure we can receive SIGUSR1. unblocksig(_SIGUSR1) waitForSigusr1.rdpipe = r waitForSigusr1.wrpipe = w mp := getg().m testSigusr1 = waitForSigusr1Callback ready(mp)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat May 20 21:27:51 UTC 2023 - 2.3K bytes - Viewed (0) -
src/runtime/debugcall.go
// // Debuggers rely on us running on the same thread until we get to // dispatch the function they asked as to. // // We're going to transfer this to the new G we just created. lockOSThread() // Create a new goroutine to execute the call on. Run this on // the system stack to avoid growing our stack. systemstack(func() { // TODO(mknyszek): It would be nice to wrap these arguments in an allocated
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 05 20:50:21 UTC 2024 - 7.1K bytes - Viewed (0) -
cni/pkg/nodeagent/netns_linux.go
// leave the thread locked to die without a risk of the current thread // left lingering with incorrect namespace. var innerError error go func() { defer wg.Done() runtime.LockOSThread() innerError = containedCall() }() wg.Wait() return innerError
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jan 31 10:05:36 UTC 2024 - 2.7K bytes - Viewed (0) -
src/runtime/proc_test.go
go func() { if locked { runtime.LockOSThread() } for { select { case <-c: cack <- true return default: runtime.Gosched() } } }() time.Sleep(10 * time.Millisecond) c <- true <-cack } func TestYieldLocked(t *testing.T) { const N = 10 c := make(chan bool) go func() { runtime.LockOSThread() for i := 0; i < N; i++ { runtime.Gosched()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 25.8K bytes - Viewed (0) -
src/runtime/debuglog_test.go
} } func TestDebugLogWraparound(t *testing.T) { skipDebugLog(t) // Make sure we don't switch logs so it's easier to fill one up. runtime.LockOSThread() defer runtime.UnlockOSThread() runtime.ResetDebugLog() var longString = strings.Repeat("a", 128) var want strings.Builder for i, j := 0, 0; j < 2*runtime.DebugLogBytes; i, j = i+1, j+len(longString) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 18 16:59:26 UTC 2022 - 4.9K bytes - Viewed (0) -
src/internal/syscall/windows/registry/key.go
func (k Key) ReadSubKeyNames() ([]string, error) { // RegEnumKeyEx must be called repeatedly and to completion. // During this time, this goroutine cannot migrate away from // its current thread. See #49320. runtime.LockOSThread() defer runtime.UnlockOSThread() names := make([]string, 0) // Registry key size limit is 255 bytes and described there: // https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-element-size-limits
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 16:42:41 UTC 2023 - 5.4K bytes - Viewed (0) -
src/syscall/syscall_linux_test.go
if e != 0 { return e } return nil }, }, } waiter := func(q <-chan uintptr, r chan<- uintptr, once bool) { for x := range q { runtime.LockOSThread() v, _, e := syscall.Syscall(syscall.SYS_PRCTL, PR_GET_KEEPCAPS, 0, 0) if e != 0 { t.Errorf("tid=%d prctl(PR_GET_KEEPCAPS) failed: %v", syscall.Gettid(), e) } else if x != v {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 23K bytes - Viewed (0) -
src/runtime/crash_unix_test.go
runtime.Close(w) }() runtime.Closeonexec(r) runtime.Closeonexec(w) var want, got int64 var wg sync.WaitGroup ready := make(chan *runtime.M) wg.Add(1) go func() { runtime.LockOSThread() want, got = runtime.WaitForSigusr1(r, w, func(mp *runtime.M) { ready <- mp }) runtime.UnlockOSThread() wg.Done() }() waitingM := <-ready runtime.SendSigusr1(waitingM)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 20:11:47 UTC 2023 - 9.2K bytes - Viewed (0) -
src/cmd/cgo/internal/test/testx.go
if runtime.GOOS == "android" { return } // Used to panic because of the UnlockOSThread below. C.lockOSThreadC() } //export lockOSThreadCallback func lockOSThreadCallback() { runtime.LockOSThread() runtime.UnlockOSThread() go C.usleep(10000) runtime.Gosched() } // issue 4054 part 2 - part 1 in test.go var issue4054b = []int{C.A, C.B, C.C, C.D, C.E, C.F, C.G, C.H, C.II, C.J}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 17 21:53:11 UTC 2023 - 10.6K bytes - Viewed (0)