Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for Stack (0.17 sec)

  1. src/cmd/cgo/internal/testcarchive/testdata/main4.c

    		die("sigaction");
    	}
    }
    
    // Test raising SIGIO on a C thread with an alternate signal stack
    // when there is a Go signal handler for SIGIO.
    static void* thread1(void* arg __attribute__ ((unused))) {
    	stack_t ss;
    	int i;
    	stack_t nss;
    	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) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testcarchive/testdata/main9.c

    	int x[10000];
    
    	use(&x[0]);
    	use(&x[9999]);
    
    	GoF();
    
    	use(&x[0]);
    	use(&x[9999]);
    }
    
    int main() {
    	GoF();                  // call GoF without using much stack
    	callGoFWithDeepStack(); // call GoF with a deep stack
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 17 21:53:11 UTC 2023
    - 460 bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testcarchive/testdata/main2.c

    static volatile sig_atomic_t sigpipeSeen;
    
    // Use up some stack space.
    static void recur(int i, char *p) {
    	char a[1024];
    
    	*p = '\0';
    	if (i > 0) {
    		recur(i - 1, a);
    	}
    }
    
    static void pipeHandler(int signo, siginfo_t* info, void* ctxt) {
    	sigpipeSeen = 1;
    }
    
    // Signal handler that uses up more stack space than a goroutine will have.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  4. src/cmd/cgo/internal/test/callback_c.c

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    #include <string.h>
    
    #include "_cgo_export.h"
    
    void
    callback(void *f)
    {
    	// use some stack space
    	volatile char data[64*1024];
    
    	data[0] = 0;
    	goCallback(f);
            data[sizeof(data)-1] = 0;
    }
    
    void
    callGoFoo(void)
    {
    	extern void goFoo(void);
    	goFoo();
    }
    
    void
    IntoC(void)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 12:00:02 UTC 2023
    - 933 bytes
    - Viewed (0)
  5. src/cmd/cgo/internal/testcshared/testdata/main4.c

    static void die(const char* msg) {
    	perror(msg);
    	exit(EXIT_FAILURE);
    }
    
    static volatile sig_atomic_t sigioSeen;
    
    // Use up some stack space.
    static void recur(int i, char *p) {
    	char a[1024];
    
    	*p = '\0';
    	if (i > 0) {
    		recur(i - 1, a);
    	}
    }
    
    // Signal handler that uses up more stack space than a goroutine will have.
    static void ioHandler(int signo, siginfo_t* info, void* ctxt) {
    	char a[1024];
    
    	recur(4, a);
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:19:50 UTC 2023
    - 4.2K bytes
    - Viewed (0)
Back to top