Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for rt_sigaction (8.88 sec)

  1. src/runtime/cgo/gcc_sigaction.c

    	ret = sigaction((int)signum, goact ? &act : NULL, oldgoact ? &oldact : NULL);
    	if (ret == -1) {
    		// runtime.rt_sigaction expects _cgo_sigaction to return errno on error.
    		_cgo_tsan_release();
    		return errno;
    	}
    
    	if (oldgoact) {
    		if (oldact.sa_flags & SA_SIGINFO) {
    			oldgoact->handler = (uintptr_t)(oldact.sa_sigaction);
    		} else {
    			oldgoact->handler = (uintptr_t)(oldact.sa_handler);
    		}
    		oldgoact->mask = 0;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 22:38:02 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. 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)
  3. 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)
  4. src/runtime/sys_linux_riscv64.s

    	MOVW	how+0(FP), A0
    	MOV	new+8(FP), A1
    	MOV	old+16(FP), A2
    	MOVW	size+24(FP), A3
    	MOV	$SYS_rt_sigprocmask, A7
    	ECALL
    	MOV	$-4096, T0
    	BLTU	A0, T0, 2(PC)
    	WORD	$0	// crash
    	RET
    
    // func rt_sigaction(sig uintptr, new, old *sigactiont, size uintptr) int32
    TEXT runtime·rt_sigaction(SB),NOSPLIT|NOFRAME,$0-36
    	MOV	sig+0(FP), A0
    	MOV	new+8(FP), A1
    	MOV	old+16(FP), A2
    	MOV	size+24(FP), A3
    	MOV	$SYS_rt_sigaction, A7
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 13:57:06 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. src/runtime/sys_linux_loong64.s

    	MOVV	new+8(FP), R5
    	MOVV	old+16(FP), R6
    	MOVW	size+24(FP), R7
    	MOVV	$SYS_rt_sigprocmask, R11
    	SYSCALL
    	MOVW	$-4096, R5
    	BGEU	R5, R4, 2(PC)
    	MOVV	R0, 0xf1(R0)	// crash
    	RET
    
    // func rt_sigaction(sig uintptr, new, old *sigactiont, size uintptr) int32
    TEXT runtime·rt_sigaction(SB),NOSPLIT|NOFRAME,$0-36
    	MOVV	sig+0(FP), R4
    	MOVV	new+8(FP), R5
    	MOVV	old+16(FP), R6
    	MOVV	size+24(FP), R7
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testcarchive/testdata/main_unix.c

    		return 2;
    	}
    	oldHandler = osa.sa_sigaction;
    
    	return 0;
    }
    
    int check_handler() {
    	if (sigaction(SIGSEGV, NULL, &sa) < 0) {
    		perror("sigaction check");
    		return 2;
    	}
    	if (sa.sa_sigaction != handler) {
    		fprintf(stderr, "ERROR: wrong signal handler: %p != %p\n", sa.sa_sigaction, handler);
    		return 2;
    	}
    	return 0;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/testsanitizers/testdata/tsan8.go

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    
    struct sigaction prev_sa;
    
    void forwardSignal(int signo, siginfo_t *info, void *context) {
    	// One of sa_sigaction and/or sa_handler
    	if ((prev_sa.sa_flags&SA_SIGINFO) != 0) {
    		prev_sa.sa_sigaction(signo, info, context);
    		return;
    	}
    	if (prev_sa.sa_handler != SIG_IGN && prev_sa.sa_handler != SIG_DFL) {
    		prev_sa.sa_handler(signo);
    		return;
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  8. src/runtime/cgo/gcc_freebsd_sigaction.c

    	struct sigaction oldact;
    	size_t i;
    
    	_cgo_tsan_acquire();
    
    	memset(&act, 0, sizeof act);
    	memset(&oldact, 0, sizeof oldact);
    
    	if (goact) {
    		if (goact->flags & SA_SIGINFO) {
    			act.sa_sigaction = (void(*)(int, siginfo_t*, void*))(goact->handler);
    		} else {
    			act.sa_handler = (void(*)(int))(goact->handler);
    		}
    		sigemptyset(&act.sa_mask);
    		for (i = 0; i < 8 * sizeof(goact->mask); i++) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 24 22:38:02 UTC 2023
    - 2K bytes
    - Viewed (0)
  9. src/cmd/cgo/internal/testcarchive/testdata/main2.c

    	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");
    	}
    
    	sa.sa_sigaction = segvHandler;
    	if (sigaction(SIGSEGV, &sa, NULL) < 0 || sigaction(SIGBUS, &sa, NULL) < 0) {
    		die("sigaction");
    	}
    
    	sa.sa_sigaction = pipeHandler;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  10. src/runtime/os_dragonfly.go

    		fn = abi.FuncPCABI0(sigtramp)
    	}
    	sa.sa_sigaction = fn
    	sigaction(i, &sa, nil)
    }
    
    //go:nosplit
    //go:nowritebarrierrec
    func setsigstack(i uint32) {
    	throw("setsigstack")
    }
    
    //go:nosplit
    //go:nowritebarrierrec
    func getsig(i uint32) uintptr {
    	var sa sigactiont
    	sigaction(i, nil, &sa)
    	return sa.sa_sigaction
    }
    
    // setSignalstackSP sets the ss_sp field of a stackt.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 05 20:34:30 UTC 2023
    - 7.1K bytes
    - Viewed (0)
Back to top