md.c
来自「java virtual machince kaffe」· C语言 代码 · 共 49 行
C
49 行
/* * amd64/openbsd2/md.c * OpenBSD amd64 specific functions. * * Copyright (c) 2006 * Kaffe.org contributors. See ChangeLog for details. * * See the file "license.terms" for information on usage and redistribution * of this file. */#include "config.h"#if defined(KAFFE_SYSTEM_UNIX_PTHREADS)#include <sys/signal.h>#include <pthread.h>#include <pthread_np.h>#include <stdio.h>#include <stdlib.h>void *mdGetStackEnd(void){ stack_t stack; if (pthread_stackseg_np(pthread_self(), &stack) != 0) { fprintf(stderr, "Kaffe VM was unable to retrieve the pointer to the stack base\n" "Aborting...\n"); exit(1); } return stack.ss_sp;}size_t mdGetStackSize(void){ stack_t stack; if (pthread_stackseg_np(pthread_self(), &stack) != 0) { fprintf(stderr, "Kaffe VM has not been able to retrieve the stack size\n" "Aborting...\n"); exit(1); } return stack.ss_size;}#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?