- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for stackSwitchCallback (0.3 sec)
-
src/runtime/testdata/testprogcgo/stackswitch.go
package main /* void callStackSwitchCallbackFromThread(void); */ import "C" import ( "fmt" "runtime/debug" ) func init() { register("StackSwitchCallback", StackSwitchCallback) } //export stackSwitchCallback func stackSwitchCallback() { // We want to trigger a bounds check on the g0 stack. To do this, we // need to call a splittable function through systemstack().
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 15:33:38 UTC 2023 - 1.1K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/stackswitch.c
#define STACK_SIZE (64ull << 10) static ucontext_t uctx_save, uctx_switch; extern void stackSwitchCallback(void); char *stack2; static void *stackSwitchThread(void *arg) { // Simple test: callback works from the normal system stack. stackSwitchCallback(); // Next, verify that switching stacks doesn't break callbacks. char *stack1 = malloc(STACK_SIZE); if (stack1 == NULL) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 26 15:17:33 UTC 2023 - 3.9K bytes - Viewed (0)