- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 49 for lockOSThread (0.2 sec)
-
src/cmd/cgo/internal/test/setgid2_linux.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 681 bytes - Viewed (0) -
src/cmd/cgo/internal/testcshared/testdata/libgo4/libgo4.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 {} }() } } var P *byte // TestSEGV makes sure that an invalid address turns into a run-time Go panic. // //export TestSEGV func TestSEGV() { defer func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 864 bytes - Viewed (0) -
misc/cgo/gmp/fib.go
) func fibber(c chan *big.Int, out chan string, n int64) { // Keep the fibbers in dedicated operating system // threads, so that this program tests coordination // between pthreads and not just goroutines. runtime.LockOSThread() i := big.NewInt(n) if n == 0 { c <- i } for { j := <-c out <- j.String() i.Add(i, j) c <- i } } func main() { c := make(chan *big.Int)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 10 22:32:35 UTC 2023 - 919 bytes - Viewed (0) -
src/cmd/cgo/internal/teststdio/testdata/chain.go
const R = 5 func link(left chan<- int, right <-chan int) { // Keep the links in dedicated operating system // threads, so that this program tests coordination // between pthreads and not just goroutines. runtime.LockOSThread() for { v := <-right stdio.Stdout.WriteString(strconv.Itoa(v) + "\n") left <- 1 + v } } func main() { leftmost := make(chan int) var left chan int right := leftmost
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 914 bytes - Viewed (0) -
src/runtime/testdata/testprog/syscall_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.5K bytes - Viewed (0) -
src/cmd/cgo/internal/teststdio/testdata/fib.go
) func fibber(c, out chan int64, i int64) { // Keep the fibbers in dedicated operating system // threads, so that this program tests coordination // between pthreads and not just goroutines. runtime.LockOSThread() if i == 0 { c <- i } for { j := <-c stdio.Stdout.WriteString(strconv.FormatInt(j, 10) + "\n") out <- j <-out i += j c <- i } } func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 965 bytes - Viewed (0) -
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) -
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)