- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 56 for lockOSThread (0.35 sec)
-
src/runtime/testdata/testprogcgo/stack_windows.go
func StackMemory() { mem1, err := getPagefileUsage() if err != nil { panic(err) } const threadCount = 100 var wg sync.WaitGroup for i := 0; i < threadCount; i++ { wg.Add(1) go func() { runtime.LockOSThread() wg.Done() select {} }() } wg.Wait() mem2, err := getPagefileUsage() if err != nil { panic(err) } // assumes that this process creates 1 thread for each
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 23 17:31:31 UTC 2023 - 1.1K bytes - Viewed (0) -
test/fixedbugs/issue5963.go
defer func() { c <- 0 }() go func() { os.Exit(<-c) }() runtime.Goexit() } func main() { } /* Before fix: invalid m->locked = 2 fatal error: internal lockOSThread error goroutine 2 [runnable]: runtime.MHeap_Scavenger() /Users/rsc/g/go/src/pkg/runtime/mheap.c:438 runtime.goexit() /Users/rsc/g/go/src/pkg/runtime/proc.c:1313 created by runtime.main
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 929 bytes - Viewed (0) -
src/runtime/debug_test.go
if err != nil { t.Fatal(err) } runtime.GOMAXPROCS(ogomaxprocs) debug.SetGCPercent(ogcpercent) } } func debugCallWorker(ready chan<- *runtime.G, stop *uint32, done chan<- error) { runtime.LockOSThread() defer runtime.UnlockOSThread() ready <- runtime.Getg() x := 2 debugCallWorker2(stop, &x) if x != 1 { done <- fmt.Errorf("want x = 2, got %d; register pointer not adjusted?", x) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 15:08:04 UTC 2023 - 8K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/libgo2/libgo2.go
// The idea is to get some threads going, so that a signal will be delivered // to a thread started by Go. // //export RunGoroutines func RunGoroutines() { for i := 0; i < 4; i++ { go func() { runtime.LockOSThread() select {} }() } } // Block blocks the current thread while running Go code. // //export Block func Block() { select {} } var P *byte
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.6K 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/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) -
src/internal/poll/fd_io_plan9.go
// Lock the current goroutine to its process // and store the pid in io so that Cancel can // interrupt it. We ignore the "hangup" signal, // so the signal does not take down the entire // Go runtime. runtime.LockOSThread() runtime_ignoreHangup() aio.pid = syscall.Getpid() aio.mu.Unlock() n, err := fn(b) aio.mu.Lock() aio.pid = -1 runtime_unignoreHangup() aio.mu.Unlock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Mar 14 17:56:50 UTC 2021 - 2.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)