Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 80 for sa_sigaction (0.31 sec)

  1. src/cmd/cgo/internal/testsanitizers/testdata/tsan_shared.go

    static void register_handler(void) __attribute__ ((constructor (200)));
    
    static void register_handler() {
    	struct sigaction sa;
    	memset(&sa, 0, sizeof(sa));
    	sigemptyset(&sa.sa_mask);
    	sa.sa_flags = SA_SIGINFO;
    	sa.sa_sigaction = check_params;
    
    	if (sigaction(SIGUSR1, &sa, NULL) != 0) {
    		perror("failed to register SIGUSR1 handler");
    		exit(EXIT_FAILURE);
    	}
    }
    */
    import "C"
    
    import "syscall"
    
    func init() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testcarchive/testdata/main4.c

    // that it is installed before the Go code starts.
    
    static void init(void) __attribute__ ((constructor (200)));
    
    static void init() {
    	struct sigaction sa;
    
    	memset(&sa, 0, sizeof sa);
    	sa.sa_sigaction = ioHandler;
    	if (sigemptyset(&sa.sa_mask) < 0) {
    		die("sigemptyset");
    	}
    	sa.sa_flags = SA_SIGINFO | SA_ONSTACK;
    	if (sigaction(SIGIO, &sa, NULL) < 0) {
    		die("sigaction");
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testcshared/testdata/main5.c

    	int i;
    	struct timespec ts;
    
    	verbose = argc > 2;
    	setvbuf(stdout, NULL, _IONBF, 0);
    
    	if (verbose) {
    		fprintf(stderr, "calling sigaction\n");
    	}
    
    	memset(&sa, 0, sizeof sa);
    	sa.sa_sigaction = ioHandler;
    	if (sigemptyset(&sa.sa_mask) < 0) {
    		die("sigemptyset");
    	}
    	sa.sa_flags = SA_SIGINFO;
    	if (sigaction(SIGIO, &sa, NULL) < 0) {
    		die("sigaction");
    	}
    
    	if (verbose) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:19:50 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  4. src/runtime/os_freebsd.go

    		archauxv(tag, val)
    	}
    	return i / 2
    }
    
    // sysSigaction calls the sigaction system call.
    //
    //go:nosplit
    func sysSigaction(sig uint32, new, old *sigactiont) {
    	// Use system stack to avoid split stack overflow on amd64
    	if asmSigaction(uintptr(sig), new, old) != 0 {
    		systemstack(func() {
    			throw("sigaction failed")
    		})
    	}
    }
    
    // asmSigaction is implemented in assembly.
    //
    //go:noescape
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 11.6K bytes
    - Viewed (0)
  5. src/runtime/sys_freebsd_riscv64.s

    	MOV	$1000000000, T2
    	MUL	T2, T0
    	ADD	T1, T0
    
    	MOV	T0, ret+0(FP)
    	RET
    
    // func asmSigaction(sig uintptr, new, old *sigactiont) int32
    TEXT runtime·asmSigaction(SB),NOSPLIT|NOFRAME,$0
    	MOV	sig+0(FP), A0		// arg 1 sig
    	MOV	new+8(FP), A1		// arg 2 act
    	MOV	old+16(FP), A2		// arg 3 oact
    	MOV	$SYS_sigaction, T0
    	ECALL
    	BEQ	T0, ZERO, ok
    	MOV	$-1, A0
    ok:
    	MOVW	A0, ret+24(FP)
    	RET
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  6. src/runtime/sys_freebsd_arm64.s

    	MOVD	$1000000000, R3
    	MUL	R3, R0
    	ADD	R2, R0
    
    	MOVD	R0, ret+0(FP)
    	RET
    
    // func asmSigaction(sig uintptr, new, old *sigactiont) int32
    TEXT runtime·asmSigaction(SB),NOSPLIT|NOFRAME,$0
    	MOVD	sig+0(FP), R0		// arg 1 sig
    	MOVD	new+8(FP), R1		// arg 2 act
    	MOVD	old+16(FP), R2		// arg 3 oact
    	MOVD	$SYS_sigaction, R8
    	SVC
    	BCC	ok
    	MOVW	$-1, R0
    ok:
    	MOVW	R0, ret+24(FP)
    	RET
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 06 18:49:01 UTC 2023
    - 9.5K bytes
    - Viewed (0)
  7. src/runtime/os_linux.go

    	*(*uintptr)(unsafe.Pointer(&s.ss_sp)) = sp
    }
    
    //go:nosplit
    func (c *sigctxt) fixsigcode(sig uint32) {
    }
    
    // sysSigaction calls the rt_sigaction system call.
    //
    //go:nosplit
    func sysSigaction(sig uint32, new, old *sigactiont) {
    	if rt_sigaction(uintptr(sig), new, old, unsafe.Sizeof(sigactiont{}.sa_mask)) != 0 {
    		// Workaround for bugs in QEMU user mode emulation.
    		//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  8. src/runtime/sigaction.go

    // This version is used on Linux and FreeBSD systems on which we don't
    // use cgo to call the C version of sigaction.
    
    //go:nosplit
    //go:nowritebarrierrec
    func sigaction(sig uint32, new, old *sigactiont) {
    	sysSigaction(sig, new, old)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 18:17:57 UTC 2021
    - 489 bytes
    - Viewed (0)
  9. src/runtime/cgo_sigaction.go

    		msanwrite(unsafe.Pointer(new), unsafe.Sizeof(*new))
    	}
    	if asanenabled && new != nil {
    		asanwrite(unsafe.Pointer(new), unsafe.Sizeof(*new))
    	}
    	if _cgo_sigaction == nil || inForkedChild {
    		sysSigaction(sig, new, old)
    	} else {
    		// We need to call _cgo_sigaction, which means we need a big enough stack
    		// for C.  To complicate matters, we may be in libpreinit (before the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 3.3K bytes
    - Viewed (0)
  10. src/runtime/defs2_linux.go

    #include <asm-generic/errno.h>
    #include <asm-generic/fcntl.h>
    #include <asm-generic/poll.h>
    #include <linux/eventpoll.h>
    
    // This is the sigaction structure from the Linux 2.1.68 kernel which
    //   is used with the rt_sigaction system call. For 386 this is not
    //   defined in any public header file.
    
    struct kernel_sigaction {
    	__sighandler_t k_sa_handler;
    	unsigned long sa_flags;
    	void (*sa_restorer) (void);
    	unsigned long long sa_mask;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 07 18:28:11 UTC 2022
    - 3.2K bytes
    - Viewed (0)
Back to top