mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / storage / ndb / include / portlib / PortDefs.h
blob0bc070a98b77d88029e3d501869b2623baf8420a
1 /* Copyright (c) 2003-2005 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #ifndef PORT_DEFS_H
17 #define PORT_DEFS_H
19 This file contains varoius declarations/definitions needed in the port of AXEVM to NT, as well as backporting
20 to Solaris...
22 $Id: PortDefs.h,v 1.5 2003/10/07 07:59:59 mikael Exp $
25 #ifdef NDB_ALPHA
26 #ifdef NDB_GCC /* only for NDB_ALPHA */
27 extern int gnuShouldNotUseRPCC();
28 #define RPCC() gnuShouldNotUseRPCC();
29 #else
30 #define RPCC() ((int)__asm(" rpcc v0;"))
31 #define MB() __asm(" mb;");
32 #define WMB() __asm(" wmb;");
33 #ifdef USE_INITIALSP
34 #define IS_IP() (__asm(" mov sp,v0;") < IPinitialSP)
35 #else /* USE_INITIALSP */
36 #define IS_IP() (((__asm(" rpcc v0;") >> 32) & 0x7) == IP_CPU)
37 #endif
38 #endif /* NDB_GCC */
39 #else /* NDB_ALPHA */
40 #if defined NDB_SPARC
41 #define MB() asm ("membar 0x0;"); /* LoadLoad */
42 #define WMB() asm ("membar 0x3;"); /* StoreStore */
43 #else /* NDB_SPARC */
44 #define MB()
45 #define WMB()
46 #endif /* NDB_SPARC */
47 #define IS_IP() (1==1)
48 extern int shouldNotUseRPCC();
49 #define RPCC() shouldNotUseRPCC();
50 #endif /* NDB_ALPHA */
52 #endif