Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for lockOSThread (0.74 sec)

  1. 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)
  2. src/runtime/debug/garbage.go

    // of goroutines. A Go program creates a new thread only when a goroutine
    // is ready to run but all the existing threads are blocked in system calls, cgo calls,
    // or are locked to other goroutines due to use of runtime.LockOSThread.
    //
    // SetMaxThreads is useful mainly for limiting the damage done by
    // programs that create an unbounded number of threads. The idea is
    // to take down the program before it takes down the operating system.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  3. src/runtime/cgocall.go

    	// exitsyscall, since it would otherwise be free to move us to
    	// a different M. The call to unlockOSThread is in this function
    	// after cgocallbackg1, or in the case of panicking, in unwindm.
    	lockOSThread()
    
    	checkm := gp.m
    
    	// Save current syscall parameters, so m.winsyscall can be
    	// used again if callback decide to make syscall.
    	winsyscall := gp.m.winsyscall
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  4. tools/istio-iptables/pkg/dependencies/implementation_linux.go

    			// Warning: Do not call UnlockOSThread! Notably, netns.Do does call this.
    			runtime.LockOSThread()
    			if err := setupSandbox(); err != nil {
    				return err
    			}
    			// Mark we have actually run the command. This lets us distinguish from a failure in setupSandbox() vs f()
    			executed = true
    			return f()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Mar 12 20:49:10 UTC 2024
    - 12K bytes
    - Viewed (0)
  5. src/os/exec.go

    // new process, so it normally starts with the program name.
    //
    // If the calling goroutine has locked the operating system thread
    // with [runtime.LockOSThread] and modified any inheritable OS-level
    // thread state (for example, Linux or Plan 9 name spaces), the new
    // process will inherit the caller's thread state.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  6. src/net/lookup_windows.go

    		err   error
    	}
    	ch := make(chan result) // unbuffered
    	go func() {
    		if err := acquireThread(ctx); err != nil {
    			ch <- result{err: mapErr(err)}
    			return
    		}
    		defer releaseThread()
    		runtime.LockOSThread()
    		defer runtime.UnlockOSThread()
    		proto, err := getprotobyname(name)
    		select {
    		case ch <- result{proto: proto, err: err}:
    		case <-ctx.Done():
    		}
    	}()
    	select {
    	case r := <-ch:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  7. src/runtime/syscall_windows_test.go

    	}
    }
    
    func TestCallbackGC(t *testing.T) {
    	nestedCall(t, runtime.GC)
    }
    
    func TestCallbackPanicLocked(t *testing.T) {
    	runtime.LockOSThread()
    	defer runtime.UnlockOSThread()
    
    	if !runtime.LockedOSThread() {
    		t.Fatal("runtime.LockOSThread didn't")
    	}
    	defer func() {
    		s := recover()
    		if s == nil {
    			t.Fatal("did not panic")
    		}
    		if s.(string) != "callback panic" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 31 16:31:35 UTC 2023
    - 32.5K bytes
    - Viewed (0)
  8. src/syscall/exec_plan9.go

    func startProcess(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) {
    	type forkRet struct {
    		pid int
    		err error
    	}
    
    	forkc := make(chan forkRet, 1)
    	go func() {
    		runtime.LockOSThread()
    		var ret forkRet
    
    		ret.pid, ret.err = forkExec(argv0, argv, attr)
    		// If fork fails there is nothing to wait for.
    		if ret.err != nil || ret.pid == 0 {
    			forkc <- ret
    			return
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. src/syscall/exec_linux.go

    	Size        int // Size.
    }
    
    type SysProcAttr struct {
    	Chroot     string      // Chroot.
    	Credential *Credential // Credential.
    	// Ptrace tells the child to call ptrace(PTRACE_TRACEME).
    	// Call runtime.LockOSThread before starting a process with this set,
    	// and don't call UnlockOSThread until done with PtraceSyscall calls.
    	Ptrace bool
    	Setsid bool // Create session.
    	// Setpgid sets the process group ID of the child to Pgid,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 07:45:37 UTC 2024
    - 23K bytes
    - Viewed (0)
  10. src/runtime/runtime2.go

    	lockedg       guintptr
    	createstack   [32]uintptr // stack that created this thread, it's used for StackRecord.Stack0, so it must align with it.
    	lockedExt     uint32      // tracking for external LockOSThread
    	lockedInt     uint32      // tracking for internal lockOSThread
    	nextwaitm     muintptr    // next m waiting for lock
    
    	mLockProfile mLockProfile // fields relating to runtime.lock contention
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
Back to top