Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 15 of 15 for osyield1 (0.24 sec)

  1. src/runtime/sys_linux_loong64.s

    	MOVV	new+0(FP), R4
    	MOVV	old+8(FP), R5
    	MOVV	$SYS_sigaltstack, R11
    	SYSCALL
    	MOVW	$-4096, R5
    	BGEU	R5, R4, 2(PC)
    	MOVV	R0, 0xf1(R0)	// crash
    	RET
    
    // func osyield()
    TEXT runtime·osyield(SB),NOSPLIT|NOFRAME,$0
    	MOVV	$SYS_sched_yield, R11
    	SYSCALL
    	RET
    
    // func sched_getaffinity(pid, len uintptr, buf *uintptr) int32
    TEXT runtime·sched_getaffinity(SB),NOSPLIT|NOFRAME,$0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  2. src/runtime/os_windows.go

    	return stdcall(fn)
    }
    
    // These must run on the system stack only.
    
    //go:nosplit
    func osyield_no_g() {
    	stdcall_no_g(_SwitchToThread, 0, 0)
    }
    
    //go:nosplit
    func osyield() {
    	systemstack(func() {
    		stdcall0(_SwitchToThread)
    	})
    }
    
    //go:nosplit
    func usleep_no_g(us uint32) {
    	timeout := uintptr(us) / 1000 // ms units
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  3. src/runtime/trace.go

    	//
    	// The critical section on each goroutine here is going to be quite short, so the likelihood
    	// that we observe a zero value is high.
    	for trace.exitingSyscall.Load() != 0 {
    		osyield()
    	}
    
    	// Record some initial pieces of information.
    	//
    	// N.B. This will also emit a status event for this goroutine.
    	tl := traceAcquire()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  4. src/runtime/syscall_windows_test.go

    			<-ch1
    			ch2 <- 1
    		}
    	}()
    	for i := 0; i < n; i++ {
    		ch1 <- 1
    		<-ch2
    	}
    }
    
    func BenchmarkOsYield(b *testing.B) {
    	for i := 0; i < b.N; i++ {
    		runtime.OsYield()
    	}
    }
    
    func BenchmarkRunningGoProgram(b *testing.B) {
    	tmpdir := b.TempDir()
    
    	src := filepath.Join(tmpdir, "main.go")
    	err := os.WriteFile(src, []byte(benchmarkRunningGoProgram), 0666)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  5. src/runtime/mgcsweep.go

    	// OK, it will be swept fairly soon.
    	for {
    		spangen := atomic.Load(&s.sweepgen)
    		if spangen == sl.sweepGen || spangen == sl.sweepGen+3 {
    			break
    		}
    		osyield()
    	}
    }
    
    // sweep frees or collects finalizers for blocks not marked in the mark phase.
    // It clears the mark bits in preparation for the next GC round.
    // Returns true if the span was returned to heap.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:52:18 UTC 2024
    - 32.9K bytes
    - Viewed (0)
Back to top