md.c
来自「java virtual machince kaffe」· C语言 代码 · 共 48 行
C
48 行
/* * sparc/openbsd2/md.c * OpenBSD Sparc specific functions. * * Copyright (c) 1996, 1997, 1998 * Transvirtual Technologies, Inc. All rights reserved. * * 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 has not been able 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 + -
显示快捷键?