- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for lockOSThread (0.57 sec)
-
src/runtime/testdata/testprog/lockosthread.go
registerInit("LockOSThreadAlt", func() { // Lock the OS thread now so main runs on the main thread. runtime.LockOSThread() }) register("LockOSThreadAlt", LockOSThreadAlt) registerInit("LockOSThreadAvoidsStatePropagation", func() { // Lock the OS thread now so main runs on the main thread. runtime.LockOSThread() }) register("LockOSThreadAvoidsStatePropagation", LockOSThreadAvoidsStatePropagation)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 20:00:09 UTC 2024 - 6.6K bytes - Viewed (0) -
src/runtime/testdata/testprog/coro.go
n := 0 next, _ := iter.Pull(i) for { runtime.LockOSThread() n++ v, ok := next() if !ok { break } if v != 5 { return fmt.Errorf("bad iterator: wanted value %d, got %d", 5, v) } } for range n { runtime.UnlockOSThread() } return nil } func callerStopLocked(i iter.Seq[int]) error { runtime.LockOSThread() next, stop := iter.Pull(i) v, _ := next()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 19:46:10 UTC 2024 - 3.6K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Tests a many interesting cases (network, syscalls, a little GC, busy goroutines, // blocked goroutines, LockOSThread, pipes, and GOMAXPROCS). //go:build ignore package main import ( "log" "net" "os" "runtime" "runtime/trace" "sync" "time" ) func main() { var wg sync.WaitGroup
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.5K bytes - Viewed (0) -
src/runtime/testdata/testprog/crash.go
var s *string _ = *s fmt.Print("SHOULD NOT BE HERE") } func testInNewThread(name string) { c := make(chan bool) go func() { runtime.LockOSThread() test(name) c <- true }() <-c } func Crash() { runtime.LockOSThread() test("main") testInNewThread("new-thread") testInNewThread("second-new-thread") test("main-again") } type P string func (p P) String() string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 19:10:41 UTC 2024 - 2.5K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/stress-start-stop.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Tests a many interesting cases (network, syscalls, a little GC, busy goroutines, // blocked goroutines, LockOSThread, pipes, and GOMAXPROCS). //go:build ignore package main import ( "bytes" "io" "log" "net" "os" "runtime" "runtime/trace" "sync" "time" ) func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 2.7K bytes - Viewed (0) -
src/syscall/pwd_plan9.go
// (locked to OS thread). Otherwise return false. func fixwd(paths ...string) bool { for _, path := range paths { if path != "" && path[0] != '/' && path[0] != '#' { runtime.LockOSThread() Fixwd() return true } } return false } // goroutine-specific getwd func getwd() (wd string, err error) { fd, err := open(".", O_RDONLY) if err != nil { return "", err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 21:03:59 UTC 2024 - 2.3K bytes - Viewed (0) -
src/runtime/coro.go
// pointer errors. type coro struct { gp guintptr f func(*coro) // State for validating thread-lock interactions. mp *m lockedExt uint32 // mp's external LockOSThread counter at coro creation time. lockedInt uint32 // mp's internal lockOSThread counter at coro creation time. } //go:linkname newcoro // newcoro creates a new coro containing a // goroutine blocked waiting to run f // and returns that coro.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 19:09:18 UTC 2024 - 7.4K 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/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)