- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for text (0.16 sec)
-
src/cmd/cgo/internal/testlife/testdata/c-life.c
// Use Go to start 4 goroutines each of which handles 1/4 of the // board. r = GoStart(0, x, y, 0, x / 2, 0, y / 2, a, n); assert(r.r0 == 0 && r.r1 == 100); // test multiple returns r = GoStart(1, x, y, x / 2, x, 0, y / 2, a, n); assert(r.r0 == 1 && r.r1 == 101); // test multiple returns GoStart(2, x, y, 0, x / 2, y / 2, y, a, n); GoStart(3, x, y, x / 2, x, y / 2, y, a, n); GoWait(0); GoWait(1); GoWait(2); GoWait(3); }
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/main4.c
// Copyright 2015 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test a C thread that calls sigaltstack and then calls Go code. #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <sched.h> #include <pthread.h> #include "libgo4.h" #ifdef _AIX
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/test/issue20910.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <assert.h> #include <stdlib.h> #include <string.h> #include "_cgo_export.h" /* Test calling a Go function with multiple return values. */ void callMulti(void) { struct multi_return result = multi(); assert(strcmp(result.r0, "multi") == 0); assert(result.r1 == 0); free(result.r0);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 459 bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/testdata/issue25756/plugin/c-life.c
// Use Go to start 4 goroutines each of which handles 1/4 of the // board. r = GoStart(0, x, y, 0, x / 2, 0, y / 2, a, n); assert(r.r0 == 0 && r.r1 == 100); // test multiple returns r = GoStart(1, x, y, x / 2, x, 0, y / 2, a, n); assert(r.r0 == 1 && r.r1 == 101); // test multiple returns GoStart(2, x, y, 0, x / 2, y / 2, y, a, n); GoStart(3, x, y, x / 2, x, y / 2, y, a, n); GoWait(0); GoWait(1); GoWait(2); GoWait(3); }
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
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that using the Go profiler in a C program does not crash. #include <stddef.h> #include <sys/time.h> #include "libgo6.h" int main(int argc, char **argv) { struct timeval tvstart, tvnow; int diff; gettimeofday(&tvstart, NULL); go_start_profile();
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/testcshared/testdata/main0.c
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.1K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/main7.c
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test that lots of calls don't deadlock. #include <stdio.h> #include "libgo7.h" int main() { int i; for (i = 0; i < 100000; i++) { GoFunction7(); } return 0;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 332 bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback_c_gccgo.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build gccgo #include "_cgo_export.h" #include <stdint.h> #include <stdio.h> #include <stdlib.h> /* Test calling panic from C. This is what SWIG does. */ extern void _cgo_panic(const char *); extern void *_cgo_allocate(size_t); void callPanic(void) { _cgo_panic("panic from C");
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 452 bytes - Viewed (0) -
src/cmd/cgo/internal/testcshared/testdata/main1.c
return ret; } ret = check_int8(handle, "DidMainRun", 0); if (ret != 0) { return ret; } ret = check_int32(handle, "FromPkg", 1024); if (ret != 0) { return ret; } // test.bash looks for "PASS" to ensure this program has reached the end. printf("PASS\n"); return 0;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 1.7K bytes - Viewed (0) -
src/cmd/cgo/internal/testcarchive/testdata/main3.c
verbose = argc > 2; setvbuf(stdout, NULL, _IONBF, 0); if (verbose) { printf("raising SIGPIPE\n"); } // Test that the Go runtime handles SIGPIPE, even if we installed // a non-default SIGPIPE handler before the runtime initializes. ProvokeSIGPIPE(); // Test that SIGPIPE on a non-main thread is also handled by Go. res = pthread_create(&tid, NULL, provokeSIGPIPE, NULL); if (res != 0) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 11:59:56 UTC 2023 - 3.9K bytes - Viewed (0)