- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for We (0.01 sec)
-
src/cmd/cgo/internal/testcarchive/testdata/main4.c
ts.tv_sec = 0; ts.tv_nsec = 1000000; nanosleep(&ts, NULL); i++; if (i > 5000) { fprintf(stderr, "looping too long waiting for signal\n"); exit(EXIT_FAILURE); } } // We should still be on the same signal stack. if (sigaltstack(NULL, &nss) < 0) { die("sigaltstack check"); } if ((nss.ss_flags & SS_DISABLE) != 0) { fprintf(stderr, "sigaltstack disabled on return from Go\n");
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 4.5K bytes - Viewed (0) -
src/cmd/cgo/internal/testlife/testdata/c-life.c
#include <assert.h> #include "life.h" #include "_cgo_export.h" const int MYCONST = 0; // Do the actual manipulation of the life board in C. This could be // done easily in Go, we are just using C for demonstration // purposes. void Step(int x, int y, int *a, int *n) { struct GoStart_return r; // Use Go to start 4 goroutines each of which handles 1/4 of the // board.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/main6.c
int diff; gettimeofday(&tvstart, NULL); go_start_profile(); // Busy wait so we have something to profile. // If we just sleep the profiling signal will never fire. while (1) { gettimeofday(&tvnow, NULL); diff = (tvnow.tv_sec - tvstart.tv_sec) * 1000 * 1000 + (tvnow.tv_usec - tvstart.tv_usec); // Profile frequency is 100Hz so we should definitely // get a signal in 50 milliseconds. if (diff > 50 * 1000) break;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 830 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue25756/plugin/c-life.c
#include <assert.h> #include "life.h" #include "_cgo_export.h" const int MYCONST = 0; // Do the actual manipulation of the life board in C. This could be // done easily in Go, we are just using C for demonstration // purposes. void Step(int x, int y, int *a, int *n) { struct GoStart_return r; // Use Go to start 4 goroutines each of which handles 1/4 of the // board.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.4K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue26213/jni.h
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // It's going to be hard to include a whole real JVM to test this. // So we'll simulate a really easy JVM using just the parts we need. // This is the relevant part of jni.h. // On Android NDK16, jobject is defined like this in C and C++ typedef void* jobject; typedef jobject jclass; typedef jobject jthrowable; typedef jobject jstring;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 874 bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/main2.c
} i = sigprocmask(SIG_UNBLOCK, &mask, NULL); if (i != 0) { fprintf(stderr, "sigprocmask: %s\n", strerror(i)); exit(EXIT_FAILURE); } // Don't try this at home. longjmp(jmp, signo); // We should never get here. abort(); } // Set up the signal handlers in a high priority constructor, // so that they are installed before the Go code starts. static void init(void) __attribute__ ((constructor (200)));
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 4.7K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/main5.c
if (verbose) { printf("attempting external signal test\n"); } fprintf(stderr, "OK\n"); fflush(stderr); // The program should be interrupted before // this sleep finishes. We use select rather // than sleep because in older versions of // glibc the sleep function does some signal // fiddling to handle SIGCHLD. If this // program is fiddling signals just when the
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 2K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue4029.c
// license that can be found in the LICENSE file. //go:build !windows && !static && !(darwin && internal) #include <stdint.h> #include <dlfcn.h> // Write our own versions of dlopen/dlsym/dlclose so that we represent // the opaque handle as a Go uintptr rather than a Go pointer to avoid // garbage collector confusion. See issue 23663. uintptr_t dlopen4029(char* name, int flags) { return (uintptr_t)(dlopen(name, flags)); }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 04 15:41:19 UTC 2023 - 781 bytes - Viewed (0) -
src/cmd/cgo/internal/testcshared/testdata/main4.c
} // Don't try this at home. longjmp(jmp, signo); // We should never get here. abort(); } int main(int argc, char** argv) { int verbose; struct sigaction sa; void* handle; void (*fn)(void); sigset_t mask; int i; struct timespec ts; verbose = argc > 2; setvbuf(stdout, NULL, _IONBF, 0); // Call setsid so that we can use kill(0, SIGIO) below.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 14 13:19:50 UTC 2023 - 4.2K bytes - Viewed (0) -
src/cmd/cgo/internal/testcshared/testdata/main2.c
// Read a string from the file descriptor and print it. int main(void) { int i; ssize_t n; char buf[20]; struct timespec ts; // The descriptor will be initialized in a thread, so we have to // give a chance to get opened. for (i = 0; i < 200; i++) { n = read(fd, buf, sizeof buf); if (n >= 0) break; if (errno != EBADF && errno != EINVAL) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.2K bytes - Viewed (0)