Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 208 for ss_size (0.1 sec)

  1. src/runtime/testdata/testprogcgo/sigstack.go

    	st.ss_sp = (char*)base;
    	st.ss_flags = 0;
    	st.ss_size = CSIGSTKSZ;
    	if (sigaltstack(&st, &ost) < 0) {
    		perror("sigaltstack failed");
    		abort();
    	}
    
    	// Call Go.
    	SigStackCallback();
    
    	// Disable signal stack and protect it so we can detect reuse.
    	if (ost.ss_flags & SS_DISABLE) {
    		// Darwin libsystem has a bug where it checks ss_size
    		// even if SS_DISABLE is set. (The kernel gets it right.)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/test/sigaltstack.go

    #endif
    
    static stack_t oss;
    static char signalStack[CSIGSTKSZ];
    
    static void changeSignalStack(void) {
    	stack_t ss;
    	memset(&ss, 0, sizeof ss);
    	ss.ss_sp = signalStack;
    	ss.ss_flags = 0;
    	ss.ss_size = CSIGSTKSZ;
    	if (sigaltstack(&ss, &oss) < 0) {
    		perror("sigaltstack");
    		abort();
    	}
    }
    
    static void restoreSignalStack(void) {
    #if (defined(__x86_64__) || defined(__i386__)) && defined(__APPLE__)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprogcgo/stackswitch.c

    	if (stack1 == NULL) {
    		perror("malloc");
    		exit(1);
    	}
    
    	if (getcontext(&uctx_switch) == -1) {
    		perror("getcontext");
    		exit(1);
    	}
    	uctx_switch.uc_stack.ss_sp = stack1;
    	uctx_switch.uc_stack.ss_size = STACK_SIZE;
    	uctx_switch.uc_link = &uctx_save;
    	makecontext(&uctx_switch, stackSwitchCallback, 0);
    
    	if (swapcontext(&uctx_save, &uctx_switch) == -1) {
    		perror("swapcontext");
    		exit(1);
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 26 15:17:33 UTC 2023
    - 3.9K bytes
    - Viewed (0)
  4. src/runtime/cgo/gcc_solaris_amd64.c

    	// Solaris processes report a tiny stack when run with "ulimit -s unlimited".
    	// Correct that as best we can: assume it's at least 1 MB.
    	// See golang.org/issue/12210.
    	if(ctx.uc_stack.ss_size < 1024*1024)
    		g->stacklo -= 1024*1024 - ctx.uc_stack.ss_size;
    
    	// Sanity check the results now, rather than getting a
    	// morestack on g0 crash.
    	if (g->stacklo >= g->stackhi) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 14:57:16 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testcarchive/testdata/main4.c

    	struct timespec ts;
    
    	// Set up an alternate signal stack for this thread.
    	memset(&ss, 0, sizeof ss);
    	ss.ss_sp = malloc(CSIGSTKSZ);
    	if (ss.ss_sp == NULL) {
    		die("malloc");
    	}
    	ss.ss_flags = 0;
    	ss.ss_size = CSIGSTKSZ;
    	if (sigaltstack(&ss, NULL) < 0) {
    		die("sigaltstack");
    	}
    
    	// Send ourselves a SIGIO.  This will be caught by the Go
    	// signal handler which should forward to the C signal
    	// handler.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testsanitizers/testdata/tsan_shared.go

    	ucontext_t* uc = (ucontext_t*)(context);
    
    	if (info->si_signo != signo) {
    		fprintf(stderr, "info->si_signo does not match signo.\n");
    		abort();
    	}
    
    	if (uc->uc_stack.ss_size == 0) {
    		fprintf(stderr, "uc_stack has size 0.\n");
    		abort();
    	}
    }
    
    
    // Set up the signal handler in a high priority constructor, so
    // that it is installed before the Go code starts.
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  7. src/runtime/defs_openbsd_arm64.go

    	sc_cookie   int64
    }
    
    type siginfo struct {
    	si_signo  int32
    	si_code   int32
    	si_errno  int32
    	pad_cgo_0 [4]byte
    	_data     [120]byte
    }
    
    type stackt struct {
    	ss_sp     uintptr
    	ss_size   uintptr
    	ss_flags  int32
    	pad_cgo_0 [4]byte
    }
    
    type timespec struct {
    	tv_sec  int64
    	tv_nsec int64
    }
    
    //go:nosplit
    func (ts *timespec) setNsec(ns int64) {
    	ts.tv_sec = ns / 1e9
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 17:31:23 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  8. src/runtime/defs_openbsd_mips64.go

    	_xxx       [8]int64
    }
    
    type siginfo struct {
    	si_signo  int32
    	si_code   int32
    	si_errno  int32
    	pad_cgo_0 [4]byte
    	_data     [120]byte
    }
    
    type stackt struct {
    	ss_sp     uintptr
    	ss_size   uintptr
    	ss_flags  int32
    	pad_cgo_0 [4]byte
    }
    
    type timespec struct {
    	tv_sec  int64
    	tv_nsec int64
    }
    
    //go:nosplit
    func (ts *timespec) setNsec(ns int64) {
    	ts.tv_sec = ns / 1e9
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 17:31:23 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/runtime/defs_openbsd_ppc64.go

    	sc_vscr   uint64
    }
    
    type siginfo struct {
    	si_signo  int32
    	si_code   int32
    	si_errno  int32
    	pad_cgo_0 [4]byte
    	_data     [120]byte
    }
    
    type stackt struct {
    	ss_sp     uintptr
    	ss_size   uintptr
    	ss_flags  int32
    	pad_cgo_0 [4]byte
    }
    
    type timespec struct {
    	tv_sec  int64
    	tv_nsec int64
    }
    
    //go:nosplit
    func (ts *timespec) setNsec(ns int64) {
    	ts.tv_sec = ns / 1e9
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 17:31:23 UTC 2023
    - 3K bytes
    - Viewed (0)
  10. src/runtime/defs_linux_s390x.go

    	_O_WRONLY    = 0x1
    	_O_CREAT     = 0x40
    	_O_TRUNC     = 0x200
    	_O_NONBLOCK  = 0x800
    	_O_CLOEXEC   = 0x80000
    	_SA_RESTORER = 0
    )
    
    type stackt struct {
    	ss_sp    *byte
    	ss_flags int32
    	ss_size  uintptr
    }
    
    type sigcontext struct {
    	psw_mask uint64
    	psw_addr uint64
    	gregs    [16]uint64
    	aregs    [16]uint32
    	fpc      uint32
    	fpregs   [16]uint64
    }
    
    type ucontext struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 19:05:10 UTC 2023
    - 3.2K bytes
    - Viewed (0)
Back to top