You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ge...@apache.org on 2005/12/01 07:04:00 UTC
svn commit: r350181 [140/198] - in
/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core: ./ depends/
depends/files/ depends/jars/ depends/libs/ depends/libs/linux.IA32/
depends/libs/win.IA32/ depends/oss/ depends/oss/linux.IA32/
depends/oss/win....
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/hymagic.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/hymagic.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/hymagic.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/hymagic.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,100 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ Define platform endianness
+ */
+
+#define HYVM_ENV_LITTLE_ENDIAN
+
+/* Insist that only the IEEE version is built. See also fdlibm.h */
+#define HY_FIXED_VERSION fdlibm_ieee
+
+/* FDLIBM only uses endian for word order, not byte order.
+ If this platform does not use the standard word order for doubles
+ then pretend we are the other endian.
+*/
+#ifdef HYVM_ENV_LITTLE_ENDIAN
+#ifdef HY_PLATFORM_DOUBLE_ORDER
+#define HY_FDLIBM_LITTLE_ENDIAN
+#endif
+#else
+#ifndef HY_PLATFORM_DOUBLE_ORDER
+#define HY_FDLIBM_LITTLE_ENDIAN
+#endif
+#endif
+
+
+#define acos fdlibm_acos
+#define asin fdlibm_asin
+#define atan fdlibm_atan
+#define atan2 fdlibm_atan2
+#define cos fdlibm_cos
+#define sin fdlibm_sin
+#define tan fdlibm_tan
+
+#define cosh fdlibm_cosh
+#define sinh fdlibm_sinh
+#define tanh fdlibm_tanh
+
+#define exp fdlibm_exp
+#define frexp fdlibm_frexp
+#define ldexp fdlibm_ldexp
+#define log fdlibm_log
+#define log10 fdlibm_log10
+#define modf fdlibm_modf
+
+#define pow fdlibm_pow
+#define sqrt fdlibm_sqrt
+
+#define ceil fdlibm_ceil
+#define fabs fdlibm_fabs
+#define floor fdlibm_floor
+#define fmod fdlibm_fmod
+
+#define erf fdlibm_erf
+#define erfc fdlibm_erfc
+#define gamma fdlibm_gamma
+#define hypot fdlibm_hypot
+#define isnan fdlibm_isnan
+#define finite fdlibm_finite
+#define j0 fdlibm_j0
+#define j1 fdlibm_j1
+#define jn fdlibm_jn
+#define lgamma fdlibm_lgamma
+#define y0 fdlibm_y0
+#define y1 fdlibm_y1
+#define yn fdlibm_yn
+
+#define acosh fdlibm_acosh
+#define asinh fdlibm_asinh
+#define atanh fdlibm_atanh
+#define cbrt fdlibm_cbrt
+#define logb fdlibm_logb
+#define nextafter fdlibm_nextafter
+#define remainder fdlibm_remainder
+#define scalb fdlibm_scalb
+
+#define matherr fdlibm_matherr
+#define significand fdlibm_significand
+#define copysign fdlibm_copysign
+#define ilogb fdlibm_ilogb
+#define rint fdlibm_rint
+#define scalbn fdlibm_scalbn
+#define expm1 fdlibm_expm1
+#define log1p fdlibm_log1p
+#define gamma_r fdlibm_gamma_r
+#define lgamma_r fdlibm_lgamma_r
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/makefile?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/makefile (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/makefile Wed Nov 30 21:29:27 2005
@@ -0,0 +1,72 @@
+# Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Makefile for module 'fdlibm'
+#
+
+include ../makefile.include
+
+LIBNAME=libhyfdlibm.a# declaration
+
+LIBPATH=../lib/# declaration
+
+BUILDFILES1 = e_acos.o e_acosh.o e_asin.o e_atan2.o e_atanh.o
+BUILDFILES2 = e_cosh.o e_exp.o e_fmod.o e_gamma.o e_gamma_r.o
+BUILDFILES3 = e_hypot.o e_j0.o e_j1.o e_jn.o e_lgamma.o
+BUILDFILES4 = e_lgamma_r.o e_log.o e_log10.o e_pow.o e_rem_pio2.o
+BUILDFILES5 = e_remainder.o e_scalb.o e_sinh.o e_sqrt.o k_cos.o
+BUILDFILES6 = k_rem_pio2.o k_sin.o k_standard.o k_tan.o s_asinh.o
+BUILDFILES7 = s_atan.o s_cbrt.o s_ceil.o s_copysign.o s_cos.o
+BUILDFILES8 = s_erf.o s_expm1.o s_fabs.o s_finite.o s_floor.o
+BUILDFILES9 = s_frexp.o s_ilogb.o s_isnan.o s_ldexp.o s_lib_version.o
+BUILDFILES10 = s_log1p.o s_logb.o s_matherr.o s_modf.o s_nextafter.o
+BUILDFILES11 = s_rint.o s_scalbn.o s_signgam.o s_significand.o s_sin.o
+BUILDFILES12 = s_tan.o s_tanh.o w_acos.o w_acosh.o w_asin.o
+BUILDFILES13 = w_atan2.o w_atanh.o w_cosh.o w_exp.o w_fmod.o
+BUILDFILES14 = w_gamma.o w_gamma_r.o w_hypot.o w_j0.o w_j1.o
+BUILDFILES15 = w_jn.o w_lgamma.o w_lgamma_r.o w_log.o w_log10.o
+BUILDFILES16 = w_pow.o w_remainder.o w_scalb.o w_sinh.o w_sqrt.o
+
+CFLAGS=-O0 -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT -DHYX86 -D_IEEE_LIBM -DHY_PLATFORM_DOUBLE_ORDER -I../include -ffloat-store $(VMDEBUG)
+
+
+.SUFFIXES:.cpp
+.cpp.o:
+ $(CXX) -O0 -fno-exceptions -fno-rtti -DLINUX -D_REENTRANT -DIPv6_FUNCTION_SUPPORT -DHYX86 -D_IEEE_LIBM -DHY_PLATFORM_DOUBLE_ORDER -I../include -ffloat-store $(VMDEBUG) -c $<
+
+ASFLAGS= -o $@
+
+.SUFFIXES:.asm
+.asm.o:
+ perl ../masm2gas/masm2gas.pl -I../include $*.asm
+ $(AS) $(ASFLAGS) -o $*.o $*.s
+ -rm $*.s
+
+all: $(LIBPATH)$(LIBNAME)
+
+$(LIBPATH)$(LIBNAME):\
+ $(BUILDFILES1) $(BUILDFILES2) $(BUILDFILES3) $(BUILDFILES4) $(BUILDFILES5) \
+ $(BUILDFILES6) $(BUILDFILES7) $(BUILDFILES8) $(BUILDFILES9) $(BUILDFILES10) \
+ $(BUILDFILES11) $(BUILDFILES12) $(BUILDFILES13) $(BUILDFILES14) $(BUILDFILES15) \
+ $(BUILDFILES16)
+ $(AR) rcv $(LIBPATH)$(LIBNAME) \
+ $(BUILDFILES1) $(BUILDFILES2) $(BUILDFILES3) $(BUILDFILES4) $(BUILDFILES5) \
+ $(BUILDFILES6) $(BUILDFILES7) $(BUILDFILES8) $(BUILDFILES9) $(BUILDFILES10) \
+ $(BUILDFILES11) $(BUILDFILES12) $(BUILDFILES13) $(BUILDFILES14) $(BUILDFILES15) \
+ $(BUILDFILES16)
+
+clean:
+ -rm -f *.o
+ -rm -f ../lib/libhyfdlibm.a
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/s_lib_version.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/s_lib_version.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/s_lib_version.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/fdlibm/s_lib_version.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,41 @@
+
+/* @(#)s_lib_version.c 1.3 95/01/18 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunSoft, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * MACRO for standards
+ */
+
+#include "fdlibm.h"
+
+/*
+ * define and initialize _LIB_VERSION
+ */
+
+/* Local Change -- insist that only the IEEE version is built. See also fdlibm.h */
+#ifndef HY_FIXED_VERSION
+
+#ifdef _POSIX_MODE
+_LIB_VERSION_TYPE _LIB_VERSION = _POSIX_;
+#else
+#ifdef _XOPEN_MODE
+_LIB_VERSION_TYPE _LIB_VERSION = _XOPEN_;
+#else
+#ifdef _SVID3_MODE
+_LIB_VERSION_TYPE _LIB_VERSION = _SVID_;
+#else /* default _IEEE_MODE */
+_LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
+#endif
+#endif
+#endif
+
+#endif /* !HY_FIXED_VERSION */
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/fltconst.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/fltconst.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/fltconst.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/fltconst.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,133 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(fltconst_h)
+#define fltconst_h
+
+#include "hycomp.h"
+/* IEEE floats consist of: sign bit, exponent field, significand field
+ single: 31 = sign bit, 30..23 = exponent (8 bits), 22..0 = significand (23 bits)
+ double: 63 = sign bit, 62..52 = exponent (11 bits), 51..0 = significand (52 bits)
+ inf == (all exponent bits set) and (all mantissa bits clear)
+ nan == (all exponent bits set) and (at least one mantissa bit set)
+ finite == (at least one exponent bit clear)
+ zero == (all exponent bits clear) and (all mantissa bits clear)
+ denormal == (all exponent bits clear) and (at least one mantissa bit set)
+ positive == sign bit clear
+ negative == sign bit set
+*/
+#define MAX_U32_DOUBLE (ESDOUBLE) (4294967296.0) /* 2^32 */
+#define MAX_U32_SINGLE (ESSINGLE) (4294967296.0) /* 2^32 */
+#define HY_POS_PI (ESDOUBLE)(3.141592653589793)
+#define DOUBLE_LO_OFFSET 0
+#define DOUBLE_HI_OFFSET 1
+
+#define LONG_LO_OFFSET 0
+#define LONG_HI_OFFSET 1
+#define RETURN_FINITE 0
+#define RETURN_NAN 1
+#define RETURN_POS_INF 2
+#define RETURN_NEG_INF 3
+#define DOUBLE_SIGN_MASK_HI 0x80000000
+#define DOUBLE_EXPONENT_MASK_HI 0x7FF00000
+#define DOUBLE_MANTISSA_MASK_LO 0xFFFFFFFF
+#define DOUBLE_MANTISSA_MASK_HI 0x000FFFFF
+#define SINGLE_SIGN_MASK 0x80000000
+#define SINGLE_EXPONENT_MASK 0x7F800000
+#define SINGLE_MANTISSA_MASK 0x007FFFFF
+#define SINGLE_NAN_BITS (SINGLE_EXPONENT_MASK | 0x00400000)
+typedef union u64u32dbl_tag {
+ U_64 u64val;
+ U_32 u32val[2];
+ I_32 i32val[2];
+ double dval;
+} U64U32DBL;
+/* Replace P_FLOAT_HI and P_FLOAT_LOW */
+/* These macros are used to access the high and low 32-bit parts of a double (64-bit) value. */
+#define LOW_U32_FROM_DBL_PTR(dblptr) (((U64U32DBL *)(dblptr))->u32val[DOUBLE_LO_OFFSET])
+#define HIGH_U32_FROM_DBL_PTR(dblptr) (((U64U32DBL *)(dblptr))->u32val[DOUBLE_HI_OFFSET])
+#define LOW_I32_FROM_DBL_PTR(dblptr) (((U64U32DBL *)(dblptr))->i32val[DOUBLE_LO_OFFSET])
+#define HIGH_I32_FROM_DBL_PTR(dblptr) (((U64U32DBL *)(dblptr))->i32val[DOUBLE_HI_OFFSET])
+#define LOW_U32_FROM_DBL(dbl) LOW_U32_FROM_DBL_PTR(&(dbl))
+#define HIGH_U32_FROM_DBL(dbl) HIGH_U32_FROM_DBL_PTR(&(dbl))
+#define LOW_I32_FROM_DBL(dbl) LOW_I32_FROM_DBL_PTR(&(dbl))
+#define HIGH_I32_FROM_DBL(dbl) HIGH_I32_FROM_DBL_PTR(&(dbl))
+#define LOW_U32_FROM_LONG64_PTR(long64ptr) (((U64U32DBL *)(long64ptr))->u32val[LONG_LO_OFFSET])
+#define HIGH_U32_FROM_LONG64_PTR(long64ptr) (((U64U32DBL *)(long64ptr))->u32val[LONG_HI_OFFSET])
+#define LOW_I32_FROM_LONG64_PTR(long64ptr) (((U64U32DBL *)(long64ptr))->i32val[LONG_LO_OFFSET])
+#define HIGH_I32_FROM_LONG64_PTR(long64ptr) (((U64U32DBL *)(long64ptr))->i32val[LONG_HI_OFFSET])
+#define LOW_U32_FROM_LONG64(long64) LOW_U32_FROM_LONG64_PTR(&(long64))
+#define HIGH_U32_FROM_LONG64(long64) HIGH_U32_FROM_LONG64_PTR(&(long64))
+#define LOW_I32_FROM_LONG64(long64) LOW_I32_FROM_LONG64_PTR(&(long64))
+#define HIGH_I32_FROM_LONG64(long64) HIGH_I32_FROM_LONG64_PTR(&(long64))
+#define IS_ZERO_DBL_PTR(dblptr) ((LOW_U32_FROM_DBL_PTR(dblptr) == 0) && ((HIGH_U32_FROM_DBL_PTR(dblptr) == 0) || (HIGH_U32_FROM_DBL_PTR(dblptr) == DOUBLE_SIGN_MASK_HI)))
+#define IS_ONE_DBL_PTR(dblptr) ((HIGH_U32_FROM_DBL_PTR(dblptr) == 0x3ff00000 || HIGH_U32_FROM_DBL_PTR(dblptr) == 0xbff00000) && (LOW_U32_FROM_DBL_PTR(dblptr) == 0))
+#define IS_NAN_DBL_PTR(dblptr) (((HIGH_U32_FROM_DBL_PTR(dblptr) & DOUBLE_EXPONENT_MASK_HI) == DOUBLE_EXPONENT_MASK_HI) && (LOW_U32_FROM_DBL_PTR(dblptr) | (HIGH_U32_FROM_DBL_PTR(dblptr) & DOUBLE_MANTISSA_MASK_HI)))
+#define IS_INF_DBL_PTR(dblptr) (((HIGH_U32_FROM_DBL_PTR(dblptr) & (DOUBLE_EXPONENT_MASK_HI|DOUBLE_MANTISSA_MASK_HI)) == DOUBLE_EXPONENT_MASK_HI) && (LOW_U32_FROM_DBL_PTR(dblptr) == 0))
+#define IS_DENORMAL_DBL_PTR(dblptr) (((HIGH_U32_FROM_DBL_PTR(dblptr) & DOUBLE_EXPONENT_MASK_HI) == 0) && ((HIGH_U32_FROM_DBL_PTR(dblptr) & DOUBLE_MANTISSA_MASK_HI) != 0 || (LOW_U32_FROM_DBL_PTR(dblptr) != 0)))
+#define IS_FINITE_DBL_PTR(dblptr) ((HIGH_U32_FROM_DBL_PTR(dblptr) & DOUBLE_EXPONENT_MASK_HI) < DOUBLE_EXPONENT_MASK_HI)
+#define IS_POSITIVE_DBL_PTR(dblptr) ((HIGH_U32_FROM_DBL_PTR(dblptr) & DOUBLE_SIGN_MASK_HI) == 0)
+#define IS_NEGATIVE_DBL_PTR(dblptr) ((HIGH_U32_FROM_DBL_PTR(dblptr) & DOUBLE_SIGN_MASK_HI) != 0)
+#define IS_NEGATIVE_MAX_DBL_PTR(dblptr) ((HIGH_U32_FROM_DBL_PTR(dblptr) == 0xFFEFFFFF) && (LOW_U32_FROM_DBL_PTR(dblptr) == 0xFFFFFFFF))
+#define IS_ZERO_DBL(dbl) IS_ZERO_DBL_PTR(&(dbl))
+#define IS_ONE_DBL(dbl) IS_ONE_DBL_PTR(&(dbl))
+#define IS_NAN_DBL(dbl) IS_NAN_DBL_PTR(&(dbl))
+#define IS_INF_DBL(dbl) IS_INF_DBL_PTR(&(dbl))
+#define IS_DENORMAL_DBL(dbl) IS_DENORMAL_DBL_PTR(&(dbl))
+#define IS_FINITE_DBL(dbl) IS_FINITE_DBL_PTR(&(dbl))
+#define IS_POSITIVE_DBL(dbl) IS_POSITIVE_DBL_PTR(&(dbl))
+#define IS_NEGATIVE_DBL(dbl) IS_NEGATIVE_DBL_PTR(&(dbl))
+#define IS_NEGATIVE_MAX_DBL(dbl) IS_NEGATIVE_MAX_DBL_PTR(&(dbl))
+#define IS_ZERO_SNGL_PTR(fltptr) ((*U32P((fltptr)) & (U_32)~SINGLE_SIGN_MASK) == (U_32)0)
+#define IS_ONE_SNGL_PTR(fltptr) ((*U32P((fltptr)) == 0x3f800000) || (*U32P((fltptr)) == 0xbf800000))
+#define IS_NAN_SNGL_PTR(fltptr) ((*U32P((fltptr)) & (U_32)~SINGLE_SIGN_MASK) > (U_32)SINGLE_EXPONENT_MASK)
+#define IS_INF_SNGL_PTR(fltptr) ((*U32P((fltptr)) & (U_32)~SINGLE_SIGN_MASK) == (U_32)SINGLE_EXPONENT_MASK)
+#define IS_DENORMAL_SNGL_PTR(fltptr) (((*U32P((fltptr)) & (U_32)~SINGLE_SIGN_MASK)-(U_32)1) < (U_32)SINGLE_MANTISSA_MASK)
+#define IS_FINITE_SNGL_PTR(fltptr) ((*U32P((fltptr)) & (U_32)~SINGLE_SIGN_MASK) < (U_32)SINGLE_EXPONENT_MASK)
+#define IS_POSITIVE_SNGL_PTR(fltptr) ((*U32P((fltptr)) & (U_32)SINGLE_SIGN_MASK) == (U_32)0)
+#define IS_NEGATIVE_SNGL_PTR(fltptr) ((*U32P((fltptr)) & (U_32)SINGLE_SIGN_MASK) != (U_32)0)
+#define IS_ZERO_SNGL(flt) IS_ZERO_SNGL_PTR(&(flt))
+#define IS_ONE_SNGL(flt) IS_ONE_SNGL_PTR(&(flt))
+#define IS_NAN_SNGL(flt) IS_NAN_SNGL_PTR(&(flt))
+#define IS_INF_SNGL(flt) IS_INF_SNGL_PTR(&(flt))
+#define IS_DENORMAL_SNGL(flt) IS_DENORMAL_SNGL_PTR(&(flt))
+#define IS_FINITE_SNGL(flt) IS_FINITE_SNGL_PTR(&(flt))
+#define IS_POSITIVE_SNGL(flt) IS_POSITIVE_SNGL_PTR(&(flt))
+#define IS_NEGATIVE_SNGL(flt) IS_NEGATIVE_SNGL_PTR(&(flt))
+#define SET_NAN_DBL_PTR(dblptr) HIGH_U32_FROM_DBL_PTR(dblptr) = (DOUBLE_EXPONENT_MASK_HI | 0x00080000); LOW_U32_FROM_DBL_PTR(dblptr) = 0
+#define SET_PZERO_DBL_PTR(dblptr) HIGH_U32_FROM_DBL_PTR(dblptr) = 0; LOW_U32_FROM_DBL_PTR(dblptr) = 0
+#define SET_NZERO_DBL_PTR(dblptr) HIGH_U32_FROM_DBL_PTR(dblptr) = DOUBLE_SIGN_MASK_HI; LOW_U32_FROM_DBL_PTR(dblptr) = 0
+#define SET_PINF_DBL_PTR(dblptr) HIGH_U32_FROM_DBL_PTR(dblptr) = DOUBLE_EXPONENT_MASK_HI; LOW_U32_FROM_DBL_PTR(dblptr) = 0
+#define SET_NINF_DBL_PTR(dblptr) HIGH_U32_FROM_DBL_PTR(dblptr) = (DOUBLE_EXPONENT_MASK_HI | DOUBLE_SIGN_MASK_HI); LOW_U32_FROM_DBL_PTR(dblptr) = 0
+#define SET_NAN_SNGL_PTR(fltptr) *U32P((fltptr)) = ((U_32)SINGLE_NAN_BITS)
+#define SET_PZERO_SNGL_PTR(fltptr) *U32P((fltptr)) = 0
+#define SET_NZERO_SNGL_PTR(fltptr) *U32P((fltptr)) = SINGLE_SIGN_MASK
+#define SET_PINF_SNGL_PTR(fltptr) *U32P((fltptr)) = SINGLE_EXPONENT_MASK
+#define SET_NINF_SNGL_PTR(fltptr) *U32P((fltptr)) = (SINGLE_EXPONENT_MASK | SINGLE_SIGN_MASK)
+
+/* on some platforms (HP720) we cannot reference an unaligned float. Build them by hand, one U_32 at a time. */
+#if defined(ATOMIC_FLOAT_ACCESS)
+#define PTR_DOUBLE_STORE(dstPtr, aDoublePtr) HIGH_U32_FROM_DBL_PTR(dstPtr) = HIGH_U32_FROM_DBL_PTR(aDoublePtr); LOW_U32_FROM_DBL_PTR(dstPtr) = LOW_U32_FROM_DBL_PTR(aDoublePtr)
+#define PTR_DOUBLE_VALUE(dstPtr, aDoublePtr) HIGH_U32_FROM_DBL_PTR(aDoublePtr) = HIGH_U32_FROM_DBL_PTR(dstPtr); LOW_U32_FROM_DBL_PTR(aDoublePtr) = LOW_U32_FROM_DBL_PTR(dstPtr)
+#else
+#define PTR_DOUBLE_STORE(dstPtr, aDoublePtr) (*(dstPtr) = *(aDoublePtr))
+#define PTR_DOUBLE_VALUE(dstPtr, aDoublePtr) (*(aDoublePtr) = *(dstPtr))
+#endif
+
+#define STORE_LONG(dstPtr, hi, lo) HIGH_U32_FROM_LONG64_PTR(dstPtr) = (hi); LOW_U32_FROM_LONG64_PTR(dstPtr) = (lo)
+#define PTR_SINGLE_VALUE(dstPtr, aSinglePtr) (*U32P(aSinglePtr) = *U32P(dstPtr))
+#define PTR_SINGLE_STORE(dstPtr, aSinglePtr) *((U_32 *)(dstPtr)) = (*U32P(aSinglePtr))
+
+#endif /* fltconst_h */
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/gp.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/gp.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/gp.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/gp.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,33 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(gp_h)
+#define gp_h
+
+struct HySigContext;
+
+typedef UDATA (*protected_fn)(void*);
+typedef void (*handler_fn)(UDATA gpType, void* gpInfo, void* userData, struct HySigContext *gpContext);
+
+#define HyPrimErrGPF 0
+#define HyPrimErrGPFInvalidRead 1
+#define HyPrimErrGPFInvalidWrite 2
+#define HyPrimErrGPFInvalidInstruction 3
+#define HyPrimErrGPFFloat 4
+
+#endif /* gp_h */
+
+
+
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/harmony.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/harmony.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/harmony.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/harmony.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,22 @@
+/* Copyright 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(harmony_h)
+#define harmony_h
+
+#define USING_VMI
+#include "vmi.h"
+
+#endif /* harmony_h */
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hycomp.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hycomp.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hycomp.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hycomp.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,329 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(hycomp_h)
+#define hycomp_h
+
+/*
+USE_PROTOTYPES: Use full ANSI prototypes.
+CLOCK_PRIMS: We want the timer/clock prims to be used
+LITTLE_ENDIAN: This is for the intel machines or other
+ little endian processors. Defaults to big endian.
+NO_LVALUE_CASTING: This is for compilers that don't like the left side
+ of assigns to be cast. It hacks around to do the
+ right thing.
+ATOMIC_FLOAT_ACCESS: For the hp720 so that float operations will work.
+LINKED_USER_PRIMITIVES: Indicates that user primitives are statically linked
+ with the VM executeable.
+OLD_SPACE_SIZE_DIFF: The 68k uses a different amount of old space.
+ This "legitimizes" the change.
+SIMPLE_SIGNAL: For machines that don't use real signals in C.
+ (eg: PC, 68k)
+OS_NAME_LOOKUP: Use nlist to lookup user primitive addresses.
+VMCALL: Tag for all functions called by the VM.
+VMAPICALL: Tag for all functions called via the PlatformFunction
+ callWith: mechanism.
+
+SYS_FLOAT: For the MPW C compiler on MACintosh. Most of the math functions
+ there return extended type which has 80 or 96 bits depending on 68881 option.
+ On All other platforms it is double
+FLOAT_EXTENDED: If defined, the type name for extended precision floats.
+PLATFORM_IS_ASCII: Must be defined if the platform is ASCII
+EXE_EXTENSION_CHAR: the executable has a delimiter that we want to stop at as part of argv[0].
+*/
+/* By default order doubles in the native (i.e. big/little endian) ordering. */
+#define HY_PLATFORM_DOUBLE_ORDER
+
+/* Linux ANSI compiler (gcc) */
+#if defined(LINUX)
+/* NOTE: Linux supports different processors -- do not assume 386 */
+#if defined(LINUXPPC64)
+#define DATA_TYPES_DEFINED
+typedef unsigned long int UDATA; /* 64bits */
+typedef unsigned long int U_64;
+typedef unsigned int U_32;
+typedef unsigned short U_16;
+typedef unsigned char U_8;
+typedef signed long int IDATA; /* 64bits */
+typedef long int I_64;
+typedef signed int I_32;
+typedef signed short I_16;
+typedef signed char I_8;
+typedef U_32 BOOLEAN;
+
+/* LinuxPPC64 is like AIX64 so we need direct function pointers */
+#if defined(LINUXPPC64)
+#define TOC_UNWRAP_ADDRESS(wrappedPointer) ((void *) (wrappedPointer)[0])
+#define TOC_STORE_TOC(dest,wrappedPointer) (dest = ((UDATA*)wrappedPointer)[1])
+#endif
+
+#else
+typedef long long I_64;
+typedef unsigned long long U_64;
+#endif
+
+typedef double SYS_FLOAT;
+#define HYCONST64(x) x##LL
+#define NO_LVALUE_CASTING
+#define FLOAT_EXTENDED long double
+#define PLATFORM_IS_ASCII
+#define PLATFORM_LINE_DELIMITER "\012"
+#define DIR_SEPARATOR '/'
+#define DIR_SEPARATOR_STR "/"
+
+/* no priorities on Linux */
+#define HY_PRIORITY_MAP {0,0,0,0,0,0,0,0,0,0,0,0}
+
+#if (defined(LINUXPPC) && !defined(LINUXPPC64))
+#define VA_PTR(valist) (&valist[0])
+#endif
+#endif
+
+
+#define GLOBAL_DATA(symbol) ((void*)&(symbol))
+#define GLOBAL_TABLE(symbol) GLOBAL_DATA(symbol)
+
+
+/* Win32 - Windows 3.1 & NT using Win32 */
+#if defined(WIN32)
+
+typedef __int64 I_64 ;
+typedef unsigned __int64 U_64 ;
+
+typedef double SYS_FLOAT;
+#define NO_LVALUE_CASTING
+#define VMAPICALL _stdcall
+#define VMCALL _cdecl
+#define EXE_EXTENSION_CHAR '.'
+
+#define DIR_SEPARATOR '\\'
+#define DIR_SEPARATOR_STR "\\"
+
+#define HY_PRIORITY_MAP { \
+ THREAD_PRIORITY_IDLE, /* 0 */\
+ THREAD_PRIORITY_LOWEST, /* 1 */\
+ THREAD_PRIORITY_BELOW_NORMAL, /* 2 */\
+ THREAD_PRIORITY_BELOW_NORMAL, /* 3 */\
+ THREAD_PRIORITY_BELOW_NORMAL, /* 4 */\
+ THREAD_PRIORITY_NORMAL, /* 5 */\
+ THREAD_PRIORITY_ABOVE_NORMAL, /* 6 */\
+ THREAD_PRIORITY_ABOVE_NORMAL, /* 7 */\
+ THREAD_PRIORITY_ABOVE_NORMAL, /* 8 */\
+ THREAD_PRIORITY_ABOVE_NORMAL, /* 9 */\
+ THREAD_PRIORITY_HIGHEST, /*10 */\
+ THREAD_PRIORITY_TIME_CRITICAL /*11 */}
+#endif
+
+#if !defined(VMCALL)
+#define VMCALL
+#define VMAPICALL
+#endif
+
+#define PVMCALL VMCALL *
+
+/* Provide some reasonable defaults for the VM "types":
+ UDATA unsigned data, can be used as an integer or pointer storage.
+ IDATA signed data, can be used as an integer or pointer storage.
+ U_64 / I_64 unsigned/signed 64 bits.
+ U_32 / I_32 unsigned/signed 32 bits.
+ U_16 / I_16 unsigned/signed 16 bits.
+ U_8 / I_8 unsigned/signed 8 bits (bytes -- not to be confused with char)
+ BOOLEAN something that can be zero or non-zero.
+*/
+#if !defined(DATA_TYPES_DEFINED)
+typedef unsigned int UDATA;
+typedef unsigned int U_32;
+typedef unsigned short U_16;
+typedef unsigned char U_8;
+/* no generic U_64 or I_64 */
+typedef int IDATA;
+typedef int I_32;
+typedef short I_16;
+typedef char I_8;
+/* don't typedef BOOLEAN since it's already def'ed on Win32 */
+
+#define BOOLEAN UDATA
+#endif
+
+#if !defined(HYCONST64)
+#define HYCONST64(x) x##L
+#endif
+
+#if !defined(HY_DEFAULT_SCHED)
+/* by default, pthreads platforms use the SCHED_OTHER thread scheduling policy */
+#define HY_DEFAULT_SCHED SCHED_OTHER
+#endif
+
+#if !defined(HY_PRIORITY_MAP)
+/* if no priority map if provided, priorities will be determined algorithmically */
+#endif
+
+#if !defined(FALSE)
+#define FALSE ((BOOLEAN) 0)
+#if !defined(TRUE)
+#define TRUE ((BOOLEAN) (!FALSE))
+#endif
+#endif
+
+#if !defined(NULL)
+#if defined(__cplusplus)
+#define NULL (0)
+#else
+#define NULL ((void *)0)
+#endif
+#endif
+#define USE_PROTOTYPES
+#if defined(USE_PROTOTYPES)
+#define PROTOTYPE(x) x
+#define VARARGS , ...
+#else
+#define PROTOTYPE(x) ()
+#define VARARGS
+#endif
+/* Assign the default line delimiter if it was not set */
+#if !defined(PLATFORM_LINE_DELIMITER)
+#define PLATFORM_LINE_DELIMITER "\015\012"
+#endif
+/* Set the max path length if it was not set */
+#if !defined(MAX_IMAGE_PATH_LENGTH)
+#define MAX_IMAGE_PATH_LENGTH (2048)
+#endif
+typedef double ESDOUBLE;
+typedef float ESSINGLE;
+/* helpers for U_64s */
+#define CLEAR_U64(u64) (u64 = (U_64)0)
+#define LOW_LONG(l) (*((U_32 *) &(l)))
+#define HIGH_LONG(l) (*(((U_32 *) &(l)) + 1))
+#define I8(x) ((I_8) (x))
+#define I8P(x) ((I_8 *) (x))
+#define U16(x) ((U_16) (x))
+#define I16(x) ((I_16) (x))
+#define I16P(x) ((I_16 *) (x))
+#define U32(x) ((U_32) (x))
+#define I32(x) ((I_32) (x))
+#define I32P(x) ((I_32 *) (x))
+#define U16P(x) ((U_16 *) (x))
+#define U32P(x) ((U_32 *) (x))
+#define OBJP(x) ((HyObject *) (x))
+#define OBJPP(x) ((HyObject **) (x))
+#define OBJPPP(x) ((HyObject ***) (x))
+#define CLASSP(x) ((Class *) (x))
+#define CLASSPP(x) ((Class **) (x))
+#define BYTEP(x) ((BYTE *) (x))
+/* Test - was conflicting with OS2.h */
+#define ESCHAR(x) ((CHARACTER) (x))
+#define FLT(x) ((FLOAT) x)
+#define FLTP(x) ((FLOAT *) (x))
+#if defined(NO_LVALUE_CASTING)
+#define LI8(x) (*((I_8 *) &(x)))
+#define LI8P(x) (*((I_8 **) &(x)))
+#define LU16(x) (*((U_16 *) &(x)))
+#define LI16(x) (*((I_16 *) &(x)))
+#define LU32(x) (*((U_32 *) &(x)))
+#define LI32(x) (*((I_32 *) &(x)))
+#define LI32P(x) (*((I_32 **) &(x)))
+#define LU16P(x) (*((U_16 **) &(x)))
+#define LU32P(x) (*((U_32 **) &(x)))
+#define LOBJP(x) (*((HyObject **) &(x)))
+#define LOBJPP(x) (*((HyObject ***) &(x)))
+#define LOBJPPP(x) (*((HyObject ****) &(x))
+#define LCLASSP(x) (*((Class **) &(x)))
+#define LBYTEP(x) (*((BYTE **) &(x)))
+#define LCHAR(x) (*((CHARACTER) &(x)))
+#define LFLT(x) (*((FLOAT) &x))
+#define LFLTP(x) (*((FLOAT *) &(x)))
+#else
+#define LI8(x) I8((x))
+#define LI8P(x) I8P((x))
+#define LU16(x) U16((x))
+#define LI16(x) I16((x))
+#define LU32(x) U32((x))
+#define LI32(x) I32((x))
+#define LI32P(x) I32P((x))
+#define LU16P(x) U16P((x))
+#define LU32P(x) U32P((x))
+#define LOBJP(x) OBJP((x))
+#define LOBJPP(x) OBJPP((x))
+#define LOBJPPP(x) OBJPPP((x))
+#define LIOBJP(x) IOBJP((x))
+#define LCLASSP(x) CLASSP((x))
+#define LBYTEP(x) BYTEP((x))
+#define LCHAR(x) CHAR((x))
+#define LFLT(x) FLT((x))
+#define LFLTP(x) FLTP((x))
+#endif
+/* Macros for converting between words and longs and accessing bits */
+#define HIGH_WORD(x) U16(U32((x)) >> 16)
+#define LOW_WORD(x) U16(U32((x)) & 0xFFFF)
+#define LOW_BIT(o) (U32((o)) & 1)
+#define LOW_2_BITS(o) (U32((o)) & 3)
+#define LOW_3_BITS(o) (U32((o)) & 7)
+#define LOW_4_BITS(o) (U32((o)) & 15)
+#define MAKE_32(h, l) ((U32((h)) << 16) | U32((l)))
+#define MAKE_64(h, l) ((((I_64)(h)) << 32) | (l))
+#if defined(__cplusplus)
+#define HY_CFUNC "C"
+#define HY_CDATA "C"
+#else
+#define HY_CFUNC
+#define HY_CDATA
+#endif
+/* Macros for tagging functions which read/write the vm thread */
+#define READSVMTHREAD
+#define WRITESVMTHREAD
+#define REQUIRESSTACKFRAME
+/* macro for tagging functions which never return */
+#if defined(__GNUC__)
+/* on GCC, we can actually pass this information on to the compiler */
+#define NORETURN __attribute__((noreturn))
+#else
+#define NORETURN
+#endif
+/* on some systems (e.g. LinuxPPC) va_list is an array type. This is probably in
+ * violation of the ANSI C spec, but it's not entirely clear. Because of this, we end
+ * up with an undesired extra level of indirection if we take the address of a
+ * va_list argument.
+ *
+ * To get it right ,always use the VA_PTR macro
+ */
+#if !defined(VA_PTR)
+#define VA_PTR(valist) (&valist)
+#endif
+/* Macros used on RS6000 to manipulate wrapped function pointers */
+#if !defined(TOC_UNWRAP_ADDRESS)
+#define TOC_UNWRAP_ADDRESS(wrappedPointer) (wrappedPointer)
+#endif
+
+#if !defined(TOC_STORE_TOC)
+#define TOC_STORE_TOC(dest,wrappedPointer)
+#endif
+/* Macros for accessing I_64 values */
+#if defined(ATOMIC_LONG_ACCESS)
+#define PTR_LONG_STORE(dstPtr, aLongPtr) ((*U32P(dstPtr) = *U32P(aLongPtr)), (*(U32P(dstPtr)+1) = *(U32P(aLongPtr)+1)))
+#define PTR_LONG_VALUE(dstPtr, aLongPtr) ((*U32P(aLongPtr) = *U32P(dstPtr)), (*(U32P(aLongPtr)+1) = *(U32P(dstPtr)+1)))
+#else
+#define PTR_LONG_STORE(dstPtr, aLongPtr) (*(dstPtr) = *(aLongPtr))
+#define PTR_LONG_VALUE(dstPtr, aLongPtr) (*(aLongPtr) = *(dstPtr))
+#endif
+/* Macro used when declaring tables which require relocations.*/
+#if !defined(HYCONST_TABLE)
+#define HYCONST_TABLE const
+#endif
+/* ANSI qsort is not always available */
+#if !defined(HY_SORT)
+#define HY_SORT(base, nmemb, size, compare) qsort((base), (nmemb), (size), (compare))
+#endif
+
+#endif /* hycomp_h */
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hylib.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hylib.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hylib.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hylib.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,29 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(HYLIB_H)
+#define HYLIB_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#define HY_ZIP_DLL_NAME "hyzlib"
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* HYLIB_H */
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hymutex.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hymutex.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hymutex.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hymutex.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,42 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(hymutex_h)
+#define hymutex_h
+
+#include <pthread.h>
+#include <stdlib.h>
+
+typedef pthread_mutex_t MUTEX;
+
+/* MUTEX_INIT */
+#define MUTEX_INIT(mutex) (pthread_mutex_init(&(mutex), NULL) == 0)
+
+/* MUTEX_DESTROY */
+#define MUTEX_DESTROY(mutex) pthread_mutex_destroy(&(mutex))
+
+/* MUTEX_ENTER */
+#define MUTEX_ENTER(mutex) pthread_mutex_lock(&(mutex))
+
+/*
+ * MUTEX_TRY_ENTER
+ * returns 0 on success
+ */
+#define MUTEX_TRY_ENTER(mutex) pthread_mutex_trylock(&(mutex))
+
+/* MUTEX_EXIT */
+#define MUTEX_EXIT(mutex) pthread_mutex_unlock(&(mutex))
+
+#endif /* hymutex_h */
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hypool.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hypool.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hypool.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/linux.IA32/include/hypool.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,88 @@
+/* Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @file
+ * @ingroup Pool
+ * @brief Pool Header
+ */
+
+#if !defined(HYPOOL_H)
+#define HYPOOL_H
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+#include "hycomp.h"
+#include "hyport.h"
+
+typedef void* (VMCALL*hymemAlloc_fptr_t)(void*,U_32);
+typedef void (VMCALL*hymemFree_fptr_t)(void*,void *);
+
+typedef struct HyPool {
+ UDATA elementSize;
+ UDATA numberOfElements;
+ UDATA usedElements;
+ void* firstElementAddress;
+ UDATA* firstFreeSlot;
+ struct HyPool* activePuddle;
+ struct HyPool* nextPool;
+ void* (PVMCALL memAlloc)(void* userData, U_32 byteAmount) ;
+ void (PVMCALL memFree)(void* userData, void* ptr) ;
+ void* userData;
+ U_16 alignment;
+ U_16 flags;
+} HyPool;
+
+#define POOL_FOR_PORT(portLib) (hymemAlloc_fptr_t)(portLib)->mem_allocate_memory, (hymemFree_fptr_t)(portLib)->mem_free_memory, portLib
+#define POOL_ALWAYS_KEEP_SORTED 4
+#define POOL_NEVER_FREE_PUDDLES 2
+#define POOL_SORTED 1
+#define HYSIZEOF_HyPool 44
+
+typedef struct HyPoolState {
+ UDATA leftToDo;
+ struct HyPool* currPool;
+ UDATA* lastAddr;
+ UDATA** nextFree;
+} HyPoolState;
+
+#define HYSIZEOF_HyPoolState 16
+#define pool_state HyPoolState
+
+/* HySourcePool*/
+extern HY_CFUNC void VMCALL pool_do PROTOTYPE((HyPool *aPool, void (*aFunction) (void *anElement, void *userData), void *userData));
+extern HY_CFUNC HyPool* VMCALL
+pool_new PROTOTYPE((U_32 structSize, U_32 minNumberElements, U_32 elementAlignment, UDATA poolFlags, void*(VMCALL*memAlloc)(void*,U_32), void(VMCALL*memFree)(void*,void*), void* userData));
+extern HY_CFUNC void* VMCALL pool_startDo PROTOTYPE((HyPool *aPool, pool_state *lastHandle));
+extern HY_CFUNC void VMCALL pool_removeElement PROTOTYPE((HyPool *aPool, void *anElement));
+extern HY_CFUNC UDATA VMCALL pool_numElements PROTOTYPE((HyPool *aPool));
+extern HY_CFUNC void* VMCALL pool_nextDo PROTOTYPE((pool_state *lastHandle));
+extern HY_CFUNC void *VMCALL pool_newElement PROTOTYPE((HyPool * aPool));
+extern HY_CFUNC HyPool *VMCALL pool_forPortLib PROTOTYPE((U_32 structSize, HyPortLibrary * portLibrary));
+extern HY_CFUNC void VMCALL pool_kill PROTOTYPE((HyPool *aPool));
+extern HY_CFUNC void VMCALL pool_sortFree PROTOTYPE((HyPool *aPool));
+extern HY_CFUNC void VMCALL pool_clear PROTOTYPE((HyPool * aPool));
+
+/* HySourcePoolCapacity*/
+extern HY_CFUNC UDATA VMCALL pool_capacity PROTOTYPE((HyPool *aPool));
+extern HY_CFUNC UDATA VMCALL pool_ensureCapacity PROTOTYPE((HyPool *aPool, UDATA newCapacity));
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* HYPOOL_H */