Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for numSig (2.73 sec)

  1. src/os/signal/signal_plan9.go

    func init() {
    	watchSignalLoop = loop
    }
    
    func loop() {
    	for {
    		process(syscall.Note(signal_recv()))
    	}
    }
    
    const numSig = 256
    
    func signum(sig os.Signal) int {
    	switch sig := sig.(type) {
    	case syscall.Note:
    		n, ok := sigtab[sig]
    		if !ok {
    			n = len(sigtab) + 1
    			if n > numSig {
    				return -1
    			}
    			sigtab[sig] = n
    		}
    		return n
    	default:
    		return -1
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 01 23:55:34 UTC 2020
    - 1K bytes
    - Viewed (0)
  2. src/os/signal/signal_unix.go

    	for {
    		process(syscall.Signal(signal_recv()))
    	}
    }
    
    func init() {
    	watchSignalLoop = loop
    }
    
    const (
    	numSig = 65 // max across all systems
    )
    
    func signum(sig os.Signal) int {
    	switch sig := sig.(type) {
    	case syscall.Signal:
    		i := int(sig)
    		if i < 0 || i >= numSig {
    			return -1
    		}
    		return i
    	default:
    		return -1
    	}
    }
    
    func enableSignal(sig int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:21 UTC 2023
    - 1K bytes
    - Viewed (0)
  3. src/os/signal/signal.go

    	"os"
    	"sync"
    )
    
    var handlers struct {
    	sync.Mutex
    	// Map a channel to the signals that should be sent to it.
    	m map[chan<- os.Signal]*handler
    	// Map a signal to the number of channels receiving it.
    	ref [numSig]int64
    	// Map channels to signals while the channel is being stopped.
    	// Not a map because entries live here only very briefly.
    	// We need a separate container because we need m to correspond to ref
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. src/os/user/listgroups_unix.go

    		if len(parts) != 3 || len(parts[0]) == 0 {
    			continue
    		}
    		gid := string(parts[2])
    		// Make sure it's numeric and not the same as primary GID.
    		numGid, err := strconv.Atoi(gid)
    		if err != nil || numGid == primaryGid {
    			continue
    		}
    
    		groups = append(groups, gid)
    	}
    
    	return groups, nil
    }
    
    func listGroups(u *User) ([]string, error) {
    	f, err := os.Open(groupFile)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 07 23:34:21 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  5. test/goprint.go

    	go println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255))
    	for {
    		numg := runtime.NumGoroutine()
    		if numg > numg0 {
    			if time.Now().After(deadline) {
    				log.Fatalf("%d goroutines > initial %d after deadline", numg, numg0)
    			}
    			runtime.Gosched()
    			continue
    		}
    		break
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 10 19:38:06 UTC 2019
    - 722 bytes
    - Viewed (0)
  6. src/reflect/badlinkname.go

    func badlinkname_rtype_Name(*rtype) string
    
    //go:linkname badlinkname_rtype_NumField reflect.(*rtype).NumField
    func badlinkname_rtype_NumField(*rtype) int
    
    //go:linkname badlinkname_rtype_NumIn reflect.(*rtype).NumIn
    func badlinkname_rtype_NumIn(*rtype) int
    
    //go:linkname badlinkname_rtype_NumMethod reflect.(*rtype).NumMethod
    func badlinkname_rtype_NumMethod(*rtype) int
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  7. pkg/printers/tablegenerator.go

    	if printFunc.Kind() != reflect.Func {
    		return fmt.Errorf("invalid print handler. %#v is not a function", printFunc)
    	}
    	funcType := printFunc.Type()
    	if funcType.NumIn() != 2 || funcType.NumOut() != 2 {
    		return fmt.Errorf("invalid print handler." +
    			"Must accept 2 parameters and return 2 value")
    	}
    	if funcType.In(1) != reflect.TypeOf((*GenerateOptions)(nil)).Elem() ||
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 26 17:14:05 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  8. src/go/internal/gccgoimporter/importer_test.go

    	{pkgpath: "nointerface", name: "I", want:...
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 15 20:17:57 UTC 2022
    - 7.2K bytes
    - Viewed (0)
Back to top