common.h
来自「kaffe Java 解释器语言,源码,Java的子集系统,开放源代码」· C头文件 代码 · 共 45 行
H
45 行
/* * parisc/common.h * Common configuration information for PA-RISC based machines. * * Copyright (c) 1996, 1997, 1998 * Transvirtual Technologies, Inc. All rights reserved. * * Copyright (c) 2003 * Kaffe.org contributors. See ChangeLog for details. * * See the file "license.terms" for information on usage and redistribution * of this file. * * sysdepCallMethod is written by Pavel Roskin <pavel_roskin@geocities.com> */#ifndef __parisc_common_h#define __parisc_common_h#define NEED_STACK_ALIGN#define STACK_ALIGN(p) ((((unsigned long)(p)) & 15) ^ (unsigned long)(p))/* * Do an atomic compare and exchange. The address 'A' is checked against * value 'O' and if they match it's exchanged with value 'N'. * We return '1' if the exchange is sucessful, otherwise 0. * * pa doesn't have an atomic compare-and-exchange instruction. we use * a C version a la MIPS for now. Might not be SMP safe. */#define COMPARE_AND_EXCHANGE(A,O,N) \({ \ int ret = 0; \ jthread_suspendall(); \ \ if (*(A) == (O)) { \ *(A) = (N); \ ret = 1; \ } \ jthread_unsuspendall(); \ ret; \})#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?