harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r350181 [196/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....
Date Thu, 01 Dec 2005 06:04:00 GMT
Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,279 @@
+/* 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 Thread
+ */
+
+/*
+ * This file contains thread routines which are compiled twice -- once for in-process, and
+ * once for out-of-process uses (e.g. debug extensions).
+ * The APIs in this file are only used for inspecting threads -- not for modifying them
+ */
+
+#if defined(HYVM_OUT_OF_PROCESS)
+#include "hydbgext.h"
+#endif
+
+#include "threaddef.h"
+
+#if defined(HYVM_OUT_OF_PROCESS)
+#define READU(field) dbgReadUDATA((UDATA*)&(field))
+#define READP(field) ((void*)dbgReadUDATA((UDATA*)&(field)))
+#undef MUTEX_ENTER
+#define MUTEX_ENTER(a)
+#undef MUTEX_EXIT
+#define MUTEX_EXIT(a)
+#undef GLOBAL_LOCK
+#define GLOBAL_LOCK(a, b)
+#undef GLOBAL_UNLOCK
+#define GLOBAL_UNLOCK(a)
+#else /* defined (HYVM_OUT_OF_PROCESS) */
+#define READU(field) ((UDATA)(field))
+#define READP(field) (field)
+#endif
+
+#define CDEV_CURRENT_FUNCTION _prototypes_private
+
+static hythread_monitor_pool_t pool_for_monitor 
+PROTOTYPE ((hythread_library_t lib, hythread_monitor_t monitor));
+static hythread_library_t get_default_library PROTOTYPE ((void));
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_monitor_walk
+/** 
+ * Walk all active monitors.
+ *
+ * @param[in] monitor If NULL, the first monitor is returned and the monitor pool
+ * is locked (thread lib is globally locked)<br> 
+ * If non-NULL, the next monitor is returned.
+ * @return a pointer to a monitor, or NULL if all monitors walked (and thread lib is globally unlocked).
+ * 
+ * @note As this is currently implemented, this must be called to walk ALL monitors. It can't
+ * be used to look for a specific monitor and then quit.
+ */
+hythread_monitor_t VMCALL
+hythread_monitor_walk (hythread_monitor_t monitor)
+{
+  hythread_monitor_pool_t pool;
+  hythread_library_t lib = get_default_library ();
+
+  ASSERT (lib);
+  ASSERT (lib->monitor_pool);
+  ASSERT (lib->monitor_pool->entries);
+  ASSERT (MACRO_SELF () != 0);
+
+  if (monitor == NULL)
+    {
+      GLOBAL_LOCK (MACRO_SELF (), CALLER_MONITOR_WALK);
+      pool = READP (lib->monitor_pool);
+      monitor = &pool->entries[0];
+      if (READU (monitor->count) != FREE_TAG)
+	return monitor;
+    }
+  else
+    {
+      pool = pool_for_monitor (lib, monitor);
+      if (pool == NULL)
+	{
+	  /* should never happen */
+	  GLOBAL_UNLOCK (MACRO_SELF ());
+	  return NULL;
+	}
+    }
+
+  do
+    {
+      if (monitor >= &pool->entries[MONITOR_POOL_SIZE - 1])
+	{
+	  if ((pool = READP (pool->next)) == NULL)
+	    {
+	      /* we've walked all monitors */
+	      GLOBAL_UNLOCK (MACRO_SELF ());
+	      return NULL;
+	    }
+	  monitor = &pool->entries[0];
+	}
+      else
+	{
+	  monitor++;
+	}
+    }
+  while (READU (monitor->count) == FREE_TAG);
+
+  return monitor;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_tls_get
+/** 
+ * Get a thread's thread local storage (TLS) value.
+ *
+ * @param[in] a thread
+ * @param[in] key key to have TLS value returned (value returned by hythread_tls_alloc)
+ * @return pointer to location of TLS or NULL on failure.
+ */
+void *VMCALL
+hythread_tls_get (hythread_t thread, hythread_tls_key_t key)
+{
+  return (void *) READU (thread->tls[key - 1]);
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION pool_for_monitor
+/* 
+ * Return the monitor pool holding a monitor.
+ * 
+ * @param[in] lib threading library (non-NULL)
+ * @param[in] monitor
+ * @return pointer to pool on success, NULL on failure (invalid monitor?)
+ */
+static hythread_monitor_pool_t
+pool_for_monitor (hythread_library_t lib, hythread_monitor_t monitor)
+{
+  hythread_monitor_pool_t pool = READP (lib->monitor_pool);
+
+  /* find out which pool the monitor is from (cache this, maybe?) 
+     (NOTE: technically, this search invokes undefined behaviour (comparing pointers from different
+     malloc's).  But it should work on every platform with a flat memory model. */
+
+  ASSERT (lib);
+  ASSERT (monitor);
+  ASSERT (pool);
+
+  while (monitor < &pool->entries[0]
+	 || monitor > &pool->entries[MONITOR_POOL_SIZE - 1])
+    {
+      if ((pool = READP (pool->next)) == NULL)
+	{
+	  break;
+	}
+    }
+
+  return pool;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_priority
+/** 
+ * Return a thread's scheduling priority.
+ * 
+ * @param[in] thread (non-NULL)
+ * @return scheduling priority
+ * @see hythread_create, hythread_set_priority
+ *
+ */
+UDATA VMCALL
+hythread_get_priority (hythread_t thread)
+{
+  ASSERT (thread);
+  return READU (thread->priority);
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_flags
+/** 
+ * Return a thread's flags.
+ * 
+ * @param[in] thread (non-NULL)
+ * @param[in] blocker if non-NULL, will be set to the monitor on which the thread is blocked (if any)
+ * @return flags
+ * 
+ */
+UDATA VMCALL
+hythread_get_flags (hythread_t thread, hythread_monitor_t * blocker)
+{
+  UDATA flags;
+
+  ASSERT (thread);
+
+  MUTEX_ENTER (thread->mutex);
+
+  if (blocker)
+    {
+      *blocker = READP (thread->monitor);
+    }
+  flags = READU (thread->flags);
+
+  MUTEX_EXIT (thread->mutex);
+
+  return flags;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_monitor_get_name
+/**
+ * Return a monitor's name.
+ * 
+ * @param[in] monitor (non-NULL)
+ * @return pointer to the monitor's name (may be NULL)
+ * 
+ * @see hythread_monitor_init_with_name
+ */
+char *VMCALL
+hythread_monitor_get_name (hythread_monitor_t monitor)
+{
+  ASSERT (monitor);
+  return READP (monitor->name);
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_monitor_get_tracing
+/*
+ * Return a monitor's tracing information.
+ * 
+ * @param[in] monitor (non-NULL)
+ * @return pointer to the monitor's tracing information (may be NULL)
+ * 
+ */
+HyThreadMonitorTracing *VMCALL
+hythread_monitor_get_tracing (hythread_monitor_t monitor)
+{
+  ASSERT (monitor);
+
+  return READP (monitor->tracing);
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION getDefaultLibrary
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION get_default_library
+/* 
+ * Return the default threading library.
+ * 
+ * @return pointer to the default threading library
+ * 
+ */
+static hythread_library_t
+get_default_library (void)
+{
+#if defined(HYVM_OUT_OF_PROCESS)
+  return dbgGetThreadLibrary ();
+#else
+  return GLOBAL_DATA (default_library);
+#endif
+}
+
+#undef CDEV_CURRENT_FUNCTION

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/hythreadinspect.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,47 @@
+/* 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(hythreadinspect_h)
+#define hythreadinspect_h
+
+#if defined(HYVM_OUT_OF_PROCESS)
+/* redefine thread functions */
+#define hythread_monitor_walk dbg_hythread_monitor_walk
+#define hythread_tls_get dbg_hythread_tls_get
+#define hythread_get_priority dbg_hythread_get_priority
+#define hythread_get_flags dbg_hythread_get_flags
+#define hythread_monitor_get_name dbg_hythread_monitor_get_name
+#define hythread_monitor_get_tracing dbg_hythread_monitor_get_tracing
+#define getVMThreadStatus dbgGetVMThreadStatus
+#endif
+
+#endif /* hythreadinspect_h */
+
+
+/* Note: This section is NOT protected by #ifdefs.
+ * It may be safely included more than once.
+ * In particular, it may be re-included by hydbgext.h
+ */
+UDATA VMCALL hythread_get_flags
+PROTOTYPE ((hythread_t thread, hythread_monitor_t * blocker));
+HyThreadMonitorTracing *VMCALL hythread_monitor_get_tracing
+PROTOTYPE ((hythread_monitor_t monitor));
+UDATA VMCALL hythread_get_priority PROTOTYPE ((hythread_t thread));
+void *VMCALL hythread_tls_get
+PROTOTYPE ((hythread_t thread, hythread_tls_key_t key));
+char *VMCALL hythread_monitor_get_name
+PROTOTYPE ((hythread_monitor_t monitor));
+hythread_monitor_t VMCALL hythread_monitor_walk
+PROTOTYPE ((hythread_monitor_t monitor));

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/makefile?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/makefile (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/makefile Wed Nov 30 21:29:27 2005
@@ -0,0 +1,79 @@
+# 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 'thread'
+#
+
+APPVER=4.0
+TARGETOS=WIN95
+_WIN32_IE=0x0500
+SEHMAP = TRUE
+!include <win32.mak>
+
+DLLFILENAME=hythr.dll# declaration
+
+DLLNAME=..\hythr.dll# declaration
+
+LIBNAME=hythr# declaration
+
+LIBPATH=..\lib\# declaration
+
+.c.obj:
+	$(cc) -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 $(cflags) -D_MT -D_DLL -MD -D_WINSOCKAPI_ -DWIN32 -Ogityb1 -Gs -GF -Zm400 -WX -Zi  /I..\include  $(VMDEBUG) $*.c
+
+.cpp.obj:
+	$(cc) -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 $(cflags) -D_MT -D_DLL -MD -D_WINSOCKAPI_ -DWIN32 -Ogityb1 -Gs -GF -Zm400 -WX -Zi  /I..\include  $(VMDEBUG) $*.cpp
+
+.asm.obj:
+	ml /c /Cp /W3 /nologo /coff /Zm /Zd /Zi /Gd $(VMASMDEBUG) -DWIN32  $<
+
+.rc.res:
+	rc -I..\include $<
+
+BUILDFILES1 = thread_copyright.obj thrhelp.obj thrspinlock.obj hythread.obj hythreadinspect.obj
+BUILDFILES2 = rwmutex.obj thrdsup.obj thrprof.obj
+
+VIRTFILES1 = hythr.res
+
+MDLLIBFILES1 = ..\lib\hypool.lib ..\lib\hycommon.lib
+
+all: \
+	 ..\lib\$(LIBNAME).lib $(DLLNAME)
+
+BUILDLIB: $(LIBPATH)$(LIBNAME).lib
+
+$(LIBPATH)$(LIBNAME).lib:\
+	$(BUILDFILES1) $(BUILDFILES2) $(VIRTFILES1) $(MDLLIBFILES1) 
+	$(implib) /NOLOGO -subsystem:windows -out:$(LIBPATH)$(LIBNAME).lib -def:$(LIBNAME).def -machine:$(CPU) \
+	$(BUILDFILES1) $(BUILDFILES2) $(VIRTFILES1) $(MDLLIBFILES1) 
+
+
+$(DLLNAME): $(LIBPATH)$(LIBNAME).lib $(LIBNAME).def \
+	$(BUILDFILES1) $(BUILDFILES2) $(VIRTFILES1) $(MDLLIBFILES1) 
+	link $(VMLINK) /NOLOGO /debug /opt:icf /opt:ref /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll /BASE:0x11500000 -machine:$(CPU) \
+	-subsystem:windows -out:$(DLLNAME) -map:$(LIBNAME).map  \
+	/comment:"Thread support library. (c) Copyright 1993, 2005 The Apache Software Foundation or its licensors, as applicable." \
+	$(BUILDFILES1) $(BUILDFILES2) $(VIRTFILES1) $(MDLLIBFILES1)  \
+	kernel32.lib  ws2_32.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib  $(LIBPATH)$(LIBNAME).exp
+
+clean:
+	-del *.map
+	-del *.obj
+	-del *.res
+	-del *.pdb
+	-del ..\lib\$(LIBNAME).lib
+	-del ..\lib\$(LIBNAME).exp
+	-del ..\hythr.pdb
+	-del $(DLLNAME)

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rasthrsup.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rasthrsup.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rasthrsup.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rasthrsup.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,28 @@
+/* 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(rasthrsup_h)
+#define rasthrsup_h
+
+/* windows.h defined UDATA.  Ignore its definition */
+#define UDATA UDATA_win32_
+#include <windows.h>
+#undef UDATA			/* this is safe because our UDATA is a typedef, not a macro */
+#include <process.h>
+
+/* RAS_THREAD_ID */
+#define RAS_THREAD_ID() GetCurrentThreadId()
+
+#endif /* rasthrsup_h */

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rwmutex.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rwmutex.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rwmutex.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/rwmutex.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,246 @@
+/* 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.
+ */
+
+#include <stdlib.h>
+#include "threaddef.h"
+
+#undef  ASSERT
+#define ASSERT(x) /**/
+  typedef struct RWMutex
+{
+  hythread_monitor_t syncMon;
+  IDATA status;
+  hythread_t writer;
+} RWMutex;
+
+#define ASSERT_RWMUTEX(m)\
+    ASSERT((m));\
+    ASSERT((m)->syncMon);
+
+#define RWMUTEX_STATUS_IDLE(m)     ((m)->status == 0)
+#define RWMUTEX_STATUS_READING(m)  ((m)->status > 0)
+#define RWMUTEX_STATUS_WRITING(m)  ((m)->status < 0)
+
+/**
+ * Acquire and initialize a new read/write mutex from the threading library.
+ *
+ * @param[out] handle pointer to a hythread_rwmutex_t to be set to point to the new mutex
+ * @param[in] flags initial flag values for the mutex
+ * @return 0 on success, negative value on failure
+ * 
+ * @see hythread_rwmutex_destroy
+ */
+IDATA VMCALL
+hythread_rwmutex_init (hythread_rwmutex_t * handle, UDATA flags,
+		       const char *name)
+{
+  RWMutex *mutex = (RWMutex *) malloc (sizeof (RWMutex));
+  hythread_monitor_init_with_name (&mutex->syncMon, 0, (char *) name);
+  mutex->status = 0;
+  mutex->writer = 0;
+
+  ASSERT (handle);
+  *handle = mutex;
+
+  return 0;
+}
+
+/**
+ * Destroy a read/write mutex.
+ * 
+ * Destroying a mutex frees the internal resources associated
+ * with it.
+ *
+ * @note A mutex must NOT be destroyed if it is owned 
+ * by any threads for either read or write access.
+ *
+ * @param[in] mutex a mutex to be destroyed
+ * @return  0 on success or negative value on failure
+ * 
+ * @see hythread_rwmutex_init
+ */
+IDATA VMCALL
+hythread_rwmutex_destroy (hythread_rwmutex_t mutex)
+{
+  ASSERT (mutex);
+  ASSERT (mutex->syncMon);
+  ASSERT (0 == mutex->status);
+  ASSERT (0 == mutex->writer);
+  hythread_monitor_destroy (mutex->syncMon);
+  free (mutex);
+  return 0;
+}
+
+/**
+ * Enter a read/write mutex as a reader.
+ * 
+ * A thread may re-enter a mutex it owns multiple times, but
+ * must exit the same number of times as a reader 
+ * using hythread_rwmutex_exit_read.
+ * 
+ * A thread with writer access can enter a monitor
+ * with reader access, but must exit the mutex in the 
+ * opposite order. 
+ * 
+ * e.g. The following is acceptable
+ * hythread_rwmutex_enter_write(mutex);
+ * hythread_rwmutex_enter_read(mutex);
+ * hythread_rwmutex_exit_read(mutex);
+ * hythread_rwmutex_exit_write(mutex);
+ * 
+ * However, a thread with read access MUST NOT
+ * ask for write access on the same mutex. 
+ * 
+ * @param[in] mutex a mutex to be entered for read access
+ * @return 0 on success
+ * 
+ * @see hythread_rwmutex_exit_read
+ */
+IDATA VMCALL
+hythread_rwmutex_enter_read (hythread_rwmutex_t mutex)
+{
+  ASSERT_RWMUTEX (mutex);
+
+  if (mutex->writer == hythread_self ())
+    {
+      hythread_monitor_exit (mutex->syncMon);
+      return 0;
+    }
+
+  hythread_monitor_enter (mutex->syncMon);
+
+  while (mutex->status < 0)
+    {
+      hythread_monitor_wait (mutex->syncMon);
+    }
+  mutex->status++;
+
+  hythread_monitor_exit (mutex->syncMon);
+  return 0;
+}
+
+/**
+ * Exit a read/write mutex as a reader.
+ * 
+ * @param[in] mutex a mutex to be exited 
+ * @return 0 on success
+ * 
+ * @see hythread_rwmutex_enter_read
+ */
+IDATA VMCALL
+hythread_rwmutex_exit_read (hythread_rwmutex_t mutex)
+{
+  ASSERT_RWMUTEX (mon);
+
+  if (mutex->writer == hythread_self ())
+    {
+      return 0;
+    }
+
+  hythread_monitor_enter (mutex->syncMon);
+
+  mutex->status--;
+  if (0 == mutex->status)
+    {
+      hythread_monitor_notify (mutex->syncMon);
+    }
+
+  hythread_monitor_exit (mutex->syncMon);
+
+  return 0;
+}
+
+/**
+ * Enter a read/write mutex as a writer.
+ * 
+ * A thread may re-enter a mutex it owns multiple times, but
+ * must exit the same number of times as a writer 
+ * using hythread_rwmutex_exit_write.
+ * 
+ * A thread with writer access can enter a monitor
+ * with reader access, but must exit the mutex in the 
+ * opposite order. 
+ * 
+ * e.g. The following is acceptable
+ * hythread_rwmutex_enter_write(mutex);
+ * hythread_rwmutex_enter_read(mutex);
+ * hythread_rwmutex_exit_read(mutex);
+ * hythread_rwmutex_exit_write(mutex);
+ * 
+ * However, a thread with read access MUST NOT
+ * ask for write access on the same mutex. 
+ * 
+ * @param[in] mutex a mutex to be entered for read access
+ * @return 0 on success
+ * 
+ * @see hythread_rwmutex_exit_write
+ */
+IDATA VMCALL
+hythread_rwmutex_enter_write (hythread_rwmutex_t mutex)
+{
+
+  hythread_t self = hythread_self ();
+  ASSERT_RWMUTEX (mutex);
+
+  /* recursive? */
+  if (mutex->writer == self)
+    {
+      mutex->status--;
+      return 0;
+    }
+
+  hythread_monitor_enter (mutex->syncMon);
+
+  while (mutex->status != 0)
+    {
+      hythread_monitor_wait (mutex->syncMon);
+    }
+  mutex->status--;
+  mutex->writer = self;
+
+  ASSERT (RWMUTEX_STATUS_WRITING (mutex));
+
+  hythread_monitor_exit (mutex->syncMon);
+
+  return 0;
+}
+
+/**
+ * Exit a read/write mutex as a writer.
+ * 
+ * @param[in] mutex a mutex to be exited
+ * @return 0 on success
+ * 
+ * @see hythread_rwmutex_enter_write
+ */
+IDATA VMCALL
+hythread_rwmutex_exit_write (hythread_rwmutex_t mutex)
+{
+  ASSERT_RWMUTEX (mon);
+
+  ASSERT (mutex->writer == hythread_self ());
+  ASSERT (RWMUTEX_STATUS_WRITING (mutex));
+  hythread_monitor_enter (mutex->syncMon);
+
+  mutex->status++;
+  if (0 == mutex->status)
+    {
+      mutex->writer = NULL;
+      hythread_monitor_notify_all (mutex->syncMon);
+    }
+
+  hythread_monitor_exit (mutex->syncMon);
+  return 0;
+}

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,229 @@
+/* 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 Thread
+ */
+
+#include <windows.h>
+#include <stdlib.h>
+#include "hycomp.h"
+#include "hymutex.h"
+
+#define CDEV_CURRENT_FUNCTION ostypes
+/* ostypes */
+
+typedef HANDLE OSTHREAD;
+typedef DWORD TLSKEY;
+typedef HANDLE COND;
+
+#define WRAPPER_TYPE void _cdecl
+
+typedef void *WRAPPER_ARG;
+
+#define WRAPPER_RETURN() return
+
+typedef HANDLE OSSEMAPHORE;
+#undef CDEV_CURRENT_FUNCTION
+
+#include "thrtypes.h"
+#include "thrdsup.h"
+
+const int priority_map[] = HY_PRIORITY_MAP;
+
+/* Unused ID variable. */
+DWORD unusedThreadID;
+
+HyThreadLibrary default_library;
+
+extern void VMCALL hythread_init (HyThreadLibrary * lib);
+extern void VMCALL hythread_shutdown (void);
+extern void fixupLocks386 (void);
+
+#define CDEV_CURRENT_FUNCTION _prototypes_private
+static BOOL WINAPI yield PROTOTYPE ((void));
+#if (!defined(HYVM_STATIC_LINKAGE))
+BOOL APIENTRY DllMain
+PROTOTYPE ((HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved));
+#endif /* !HYVM_STATIC_LINKAGE */
+
+#undef CDEV_CURRENT_FUNCTION
+
+BOOL (WINAPI * f_yield) (void);
+#define CDEV_CURRENT_FUNCTION yield
+static BOOL WINAPI
+yield (void)
+{
+  Sleep (1);
+  return 0;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION DllMain
+#if (!defined(HYVM_STATIC_LINKAGE))
+/*
+ * Initialize OS-specific threading helpers.
+ * 
+ * @param hModule handle to module being loaded
+ * @param ul_reason_for_call reason why DllMain being called
+ * @param lpReserved reserved
+ * @return TRUE on success, FALSE on failure.
+ */
+BOOL APIENTRY
+DllMain (HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
+{
+  switch (ul_reason_for_call)
+    {
+    case DLL_PROCESS_ATTACH:
+      {
+	hythread_library_t lib = GLOBAL_DATA (default_library);
+	hythread_init (lib);
+	if (lib->initStatus == 1)
+	  {
+	    OSVERSIONINFO versionInfo;
+	    fixupLocks386 ();
+	    /* SwitchToThread is not implemented on Win98 */
+	    versionInfo.dwOSVersionInfoSize = sizeof (versionInfo);
+	    if (GetVersionEx (&versionInfo))
+	      {
+		if (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
+		  {
+		    HMODULE kernel32 = GetModuleHandle ("kernel32");
+		    if (kernel32 != NULL)
+		      {
+			f_yield =
+			  (BOOL (WINAPI *) (void)) GetProcAddress (kernel32,
+								   "SwitchToThread");
+		      }
+		  }
+	      }
+	    if (f_yield == NULL)
+	      f_yield = yield;
+	  }
+	return lib->initStatus == 1;
+      }
+    case DLL_PROCESS_DETACH:
+      hythread_shutdown ();
+    }
+  return TRUE;
+}
+#endif /* !HYVM_STATIC_LINKAGE */
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION init_thread_library
+#if (defined(HYVM_STATIC_LINKAGE))
+/**
+ * Perform OS-specific initializations for the threading library.
+ * 
+ * @return 0 on success or non-zero value on failure.
+ */
+IDATA
+init_thread_library (void)
+{
+  hythread_library_t lib = GLOBAL_DATA (default_library);
+  if (lib->initStatus == 0)
+    {
+      HANDLE mutex = CreateMutex (NULL, TRUE, "hythread_init_mutex");
+      if (mutex == NULL)
+	return -1;
+      if (lib->initStatus == 0)
+	{
+	  hythread_init (lib);
+	  if (lib->initStatus == 1)
+	    {
+	      atexit (hythread_shutdown);
+	    }
+	}
+      ReleaseMutex (mutex);
+      CloseHandle (mutex);
+      if (lib->initStatus == 1)
+	{
+	  OSVERSIONINFO versionInfo;
+	  fixupLocks386 ();
+	  /* SwitchToThread is not implemented on Win98 */
+	  versionInfo.dwOSVersionInfoSize = sizeof (versionInfo);
+	  if (GetVersionEx (&versionInfo))
+	    {
+	      if (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
+		{
+		  HMODULE kernel32 = GetModuleHandle ("kernel32");
+		  if (kernel32 != NULL)
+		    {
+		      f_yield =
+			(BOOL (WINAPI *) (void)) GetProcAddress (kernel32,
+								 "SwitchToThread");
+		    }
+		}
+	    }
+	  if (f_yield == NULL)
+	    f_yield = yield;
+	}
+    }
+  return lib->initStatus != 1;
+}
+#endif /* HYVM_STATIC_LINKAGE */
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION initialize_thread_priority
+/**
+ * Initialize a thread's priority.
+ * 
+ * Here the threading library priority value is converted to the appropriate
+ * OS-specific value.
+ * 
+ * @param[in] thread a thread
+ * @return none
+ */
+void
+initialize_thread_priority (hythread_t thread)
+{
+  IDATA priority, i;
+
+  thread->priority = HYTHREAD_PRIORITY_NORMAL;
+
+  if (priority_map[HYTHREAD_PRIORITY_MIN] ==
+      priority_map[HYTHREAD_PRIORITY_MAX])
+    return;
+
+  priority = GetThreadPriority (thread->handle);
+
+  /* are priorities mapped backwards? (WinCE does this.) */
+  if (THREAD_PRIORITY_IDLE > THREAD_PRIORITY_TIME_CRITICAL)
+    {
+      for (i = HYTHREAD_PRIORITY_MAX; i >= HYTHREAD_PRIORITY_MIN; i--)
+	{
+	  if (priority <= priority_map[i])
+	    {
+	      thread->priority = i;
+	      return;
+	    }
+	}
+    }
+  else
+    {
+      for (i = HYTHREAD_PRIORITY_MIN; i <= HYTHREAD_PRIORITY_MAX; i++)
+	{
+	  if (priority <= priority_map[i])
+	    {
+	      thread->priority = i;
+	      return;
+	    }
+	}
+    }
+}
+
+#undef CDEV_CURRENT_FUNCTION

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrdsup.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,150 @@
+/* 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(thrdsup_h)
+#define thrdsup_h
+
+/* windows.h defined UDATA.  Ignore its definition */
+#define UDATA UDATA_win32_
+#include <windows.h>
+#undef UDATA			/* this is safe because our UDATA is a typedef, not a macro */
+#include <process.h>
+#include "hymutex.h"
+
+/* ostypes */
+typedef HANDLE OSTHREAD;
+typedef DWORD TLSKEY;
+typedef HANDLE COND;
+
+#define WRAPPER_TYPE void _cdecl
+
+typedef void *WRAPPER_ARG;
+#define WRAPPER_RETURN() return
+typedef HANDLE OSSEMAPHORE;
+
+#include "hycomp.h"
+/* this file might be included from a directory other than thread. Use a pseudo-absolute path to make 
+ * sure that we find thrtypes.h in the right place. Only IBMC needs this.
+ */
+#include "../thread/thrtypes.h"
+void initialize_thread_priority PROTOTYPE ((hythread_t thread));
+IDATA init_thread_library PROTOTYPE ((void));
+extern const int priority_map[];
+extern struct HyThreadLibrary default_library;
+extern BOOL (WINAPI * f_yield) (void);
+
+/* Unused ID variable. */
+extern DWORD unusedThreadID;
+/* COND_DESTROY */
+#define COND_DESTROY(cond) CloseHandle(cond)
+/* TLS_GET */
+#define TLS_GET(key) (TlsGetValue(key))
+/* TLS_ALLOC */
+#define TLS_ALLOC(key) ((key = TlsAlloc()) == 0xFFFFFFFF)
+/* TLS_SET */
+#define TLS_SET(key, value) (TlsSetValue(key, value))
+/* THREAD_SELF */
+#define THREAD_SELF() (GetCurrentThread())
+/* THREAD_YIELD */
+
+#define _WIN32_WINNT 0x0400
+#define THREAD_YIELD() (f_yield())
+
+/* THREAD_CREATE */
+
+#define THREAD_CREATE(thread, stacksize, priority, entrypoint, entryarg)	\
+	(((thread)->handle = (HANDLE)_beginthread((entrypoint), (stacksize), (entryarg))) != (HANDLE)(-1) && \
+		hythread_set_priority((thread), (priority)) == 0)
+
+/* COND_NOTIFY_ALL */
+#define COND_NOTIFY_ALL(cond) SetEvent(cond)
+/* COND_WAIT_IF_TIMEDOUT */
+/* NOTE: the calling thread must already own mutex */
+#define ADJUST_TIMEOUT(millis, nanos) (((nanos) && ((millis) != ((IDATA) (((UDATA)-1) >> 1)))) ? ((millis) + 1) : (millis))
+#define COND_WAIT_IF_TIMEDOUT(cond, mutex, millis, nanos) 		\
+	do {																								\
+		DWORD starttime_ = GetTickCount(); \
+		IDATA initialtimeout_, timeout_, rc_;			\
+		initialtimeout_ = timeout_ = ADJUST_TIMEOUT(millis, nanos);														\
+		while (1) {						\
+			ResetEvent((cond));																			\
+			MUTEX_EXIT(mutex);																		\
+			rc_ = WaitForSingleObject((cond), timeout_);	\
+			MUTEX_ENTER(mutex);				\
+			if (rc_ == WAIT_TIMEOUT)
+
+#define COND_WAIT_TIMED_LOOP()						\
+			timeout_ = initialtimeout_ - (GetTickCount() - starttime_);	\
+			if (timeout_ < 0) { timeout_ = 0; } \
+		}	} while(0)
+
+/* COND_WAIT */
+/* NOTE: the calling thread must already own mutex */
+#define COND_WAIT(cond, mutex) \
+	do { \
+		ResetEvent((cond));	\
+		MUTEX_EXIT(mutex);	\
+		WaitForSingleObject((cond), INFINITE);	\
+		MUTEX_ENTER(mutex);
+
+#define COND_WAIT_LOOP()	} while(1)
+
+/* COND_INIT */
+#define COND_INIT(cond) ((cond = CreateEvent(NULL, TRUE, FALSE, NULL)) != NULL)
+
+/* TLS_DESTROY */
+#define TLS_DESTROY(key) (TlsFree(key))
+
+/* THREAD_CANCEL */
+#define THREAD_CANCEL(thread) (TerminateThread(thread, (DWORD)-1)&&WaitForSingleObject(thread,INFINITE))
+
+/* THREAD_EXIT */
+#define THREAD_EXIT() _endthread()
+
+/* THREAD_DETACH */
+#define THREAD_DETACH(thread)	/* no need to do anything */
+
+/* THREAD_SET_PRIORITY */
+#define THREAD_SET_PRIORITY(thread, priority) (!SetThreadPriority((thread), (priority)))
+
+/* SEM_CREATE */
+/* Arbitrary maximum count */
+#define SEM_CREATE(inval) CreateSemaphore(NULL,inval,2028,NULL)
+
+/* SEM_INIT */
+#define SEM_INIT(sm,pshrd,inval)  (sm != NULL) ? 0: -1
+
+/* SEM_DESTROY */
+#define SEM_DESTROY(sm)  CloseHandle(sm)
+
+/* SEM_FREE */
+#define SEM_FREE(s)
+
+/* SEM_POST */
+#define SEM_POST(sm)  (ReleaseSemaphore((sm),1,NULL) ? 0 : -1)
+
+/* SEM_WAIT */
+#define SEM_WAIT(sm)  ((WaitForSingleObject((sm), INFINITE) == WAIT_FAILED) ? -1 : 0)
+
+/* SEM_TRYWAIT */
+#define SEM_TRYWAIT(sm)  WaitForSingleObject(sm, 0)
+
+/* SEM_GETVALUE */
+#define SEM_GETVALUE(sm)
+#if !defined(HYVM_STATIC_LINKAGE)
+#define init_thread_library() (0)
+#endif
+
+#endif /* thrdsup_h */

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thread_copyright.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thread_copyright.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thread_copyright.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thread_copyright.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,19 @@
+/* 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.
+ */
+
+/* A copyright string included in each DLL and executable */
+
+const char hyCopyright[] =
+  "(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable.";

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/threaddef.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/threaddef.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/threaddef.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/threaddef.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,223 @@
+/* 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(threaddef_h)
+#define threaddef_h
+
+#include <string.h>
+
+#include "thrdsup.h"
+#include "rasthrsup.h"
+#include "hythread.h"
+#undef hythread_monitor_init
+#undef hythread_monitor_init_with_name
+#include "thrtypes.h"
+#include "hypool.h"
+
+/*
+   Define this to force a thread to be spawned when
+   interrupting a waiting thread 
+	 (it's a debug thing)
+*/
+#undef ALWAYS_SPAWN_THREAD_TO_INTERRUPT
+
+/* You got to know what time it is */
+typedef U_64 hytime_t;
+typedef I_64 hytime_delta_t;
+/* ASSERT and Debug */
+
+#if !defined(STATIC_ASSERT)
+#define STATIC_ASSERT(x) do { typedef int failed_assert[(x) ? 1 : -1]; } while(0)
+#endif /* STATIC_ASSERT */
+
+#if defined(THREAD_ASSERTS)
+
+#define UNOWNED ((hythread_t)-1)
+extern hythread_t global_lock_owner;
+#undef NDEBUG
+#include <assert.h>
+#if !defined(ASSERT)
+#define ASSERT(x) assert((x))
+#endif /* !ASSERT */
+
+#if !defined(ASSERT_DEBUG)
+#define ASSERT_DEBUG(x) assert((x))
+#endif
+
+#else /* THREAD_ASSERTS */
+
+#if !defined(ASSERT)
+#define ASSERT(ignore) ((void)0)
+#endif /* !ASSERT */
+
+#if !defined(ASSERT_DEBUG)
+#define ASSERT_DEBUG(ignore) ((void)0)
+#endif /* !ASSERT_DEBUG */
+
+#endif /* THREAD_ASSERTS */
+
+#undef  DEBUG
+#define DEBUG (0)
+
+/* Helper defines for notify_thread() */
+#define SET_NOTIFIED_FLAG (1)
+#define DONT_SET_NOTIFIED_FLAG (0)
+
+void hythread_monitor_pin
+PROTOTYPE ((hythread_monitor_t monitor, hythread_t self));
+void hythread_monitor_unpin
+PROTOTYPE ((hythread_monitor_t monitor, hythread_t self));
+void paint_stack PROTOTYPE ((hythread_t thread));
+
+/*
+ * constants for profiling
+ */
+#define MAX_CALLER_INDEX 63
+enum
+{
+  CALLER_ATTACH = 0,
+  CALLER_DESTROY,
+  CALLER_SUSPEND,
+  CALLER_RESUME,
+  CALLER_CLEAR_INTERRUPTED,
+  CALLER_THREAD_WRAPPER,
+  CALLER_NOTIFY_ONE_OR_ALL,
+  CALLER_SLEEP_INTERRUPTABLE,
+  CALLER_TRY_ENTER_USING,
+  CALLER_SLEEP,
+  CALLER_EXIT_MONITOR,
+  CALLER_DETACH,
+  CALLER_CLEAR_PRIORITY_INTERRUPTED,
+  CALLER_INTERNAL_EXIT1,
+  CALLER_INTERNAL_EXIT2,
+  CALLER_MONITOR_ENTER1,
+  CALLER_MONITOR_ENTER2,
+  CALLER_MONITOR_ENTER_THREE_TIER1,
+  CALLER_MONITOR_ENTER_THREE_TIER2,
+  CALLER_MONITOR_ENTER_THREE_TIER3,
+  CALLER_MONITOR_EXIT1,
+  CALLER_MONITOR_WAIT1,
+  CALLER_MONITOR_WAIT2,
+  CALLER_INTERRUPT_THREAD,
+  CALLER_MONITOR_NUM_WAITING,
+  CALLER_MONITOR_DESTROY,
+  CALLER_GLOBAL_LOCK,
+  CALLER_MONITOR_ACQUIRE,
+  CALLER_INTERRUPT_SERVER,
+  CALLER_RESET_TRACING,
+  CALLER_LIB_SET_FLAGS,
+  CALLER_LIB_CLEAR_FLAGS,
+  CALLER_PARK,
+  CALLER_UNPARK,
+  CALLER_LAST_INDEX
+};
+
+/* helper defines for local functions */
+#define WAIT_INTERRUPTABLE   (1)
+#define WAIT_UNINTERRUPTABLE (0)
+#define NOTIFY_ONE (0)
+#define NOTIFY_ALL (1)
+#define GLOBAL_NOT_LOCKED (0)
+#define GLOBAL_IS_LOCKED  (1)
+
+/* MACRO_SELF */
+#define MACRO_SELF() ((hythread_t)TLS_GET( ((hythread_library_t)GLOBAL_DATA(default_library))->self_ptr))
+
+/* GLOBAL_LOCK */
+#if defined(THREAD_ASSERTS)
+#define GLOBAL_LOCK(self,caller) { ASSERT(global_lock_owner != self); MUTEX_ENTER((self)->library->monitor_mutex); ASSERT(UNOWNED == global_lock_owner); global_lock_owner = self; }
+#else
+#define GLOBAL_LOCK(self, caller) MUTEX_ENTER(self->library->monitor_mutex)
+#endif
+
+/* GLOBAL_UNLOCK */
+#if defined(THREAD_ASSERTS)
+#define GLOBAL_UNLOCK(self) { ASSERT (self == global_lock_owner); global_lock_owner = UNOWNED; MUTEX_EXIT(self->library->monitor_mutex); }
+#else
+#define GLOBAL_UNLOCK(self) MUTEX_EXIT(self->library->monitor_mutex)
+#endif
+
+/*
+ * GLOBAL_LOCK_SIMPLE
+ * locking when you don't have a thread, just a lib
+ */
+#if defined(THREAD_ASSERTS)
+#define GLOBAL_LOCK_SIMPLE(lib) { hythread_t self = MACRO_SELF(); ASSERT (self != global_lock_owner); MUTEX_ENTER(lib->monitor_mutex); ASSERT(UNOWNED == global_lock_owner); global_lock_owner = self; }
+#else
+#define GLOBAL_LOCK_SIMPLE(lib) MUTEX_ENTER(lib->monitor_mutex)
+#endif
+
+/*
+ * GLOBAL_UNLOCK_SIMPLE
+ * unlocking when you don't have a thread, just a lib
+ */
+#if defined(THREAD_ASSERTS)
+#define GLOBAL_UNLOCK_SIMPLE(lib) { ASSERT (MACRO_SELF() == global_lock_owner); global_lock_owner = UNOWNED; MUTEX_EXIT(lib->monitor_mutex); }
+#else
+#define GLOBAL_UNLOCK_SIMPLE(lib) MUTEX_EXIT(lib->monitor_mutex)
+#endif
+
+/* THREAD_LOCK */
+#define THREAD_LOCK(self, thread, caller) MUTEX_ENTER(thread->mutex)
+
+/* THREAD_UNLOCK */
+#define THREAD_UNLOCK(self, thread) MUTEX_EXIT(thread->mutex)
+
+/* MONITOR_LOCK */
+#define MONITOR_LOCK(self, monitor, caller) MUTEX_ENTER(monitor->mutex)
+
+/* MONITOR_TRY_LOCK */
+#if defined(FORCE_TO_USE_IS_THREAD)
+/*
+ * Force the use of the interruptServer (IS) thread by always failing
+ * when trying to enter a monitor without blocking
+ */
+#define MONITOR_TRY_LOCK(monitor)  (-1)
+#else
+#define MONITOR_TRY_LOCK(monitor) (MUTEX_TRY_ENTER(monitor->mutex))
+#endif
+
+/* MONITOR_UNLOCK */
+#define MONITOR_UNLOCK(self, monitor) MUTEX_EXIT(monitor->mutex)
+
+/* IS_JLM_ENABLED */
+#define IS_JLM_ENABLED(thread) ((thread)->library->flags & HYTHREAD_FLAG_JLM_ENABLED)
+
+/* IS_JLM_TS_ENABLED */
+#define IS_JLM_TS_ENABLED(thread) ((thread)->library->flags & HYTHREAD_FLAG_JLMTS_ENABLED)
+
+/* IS_JLM_HST_ENABLED */
+#define IS_JLM_HST_ENABLED(thread) ((thread)->library->flags & HYTHREAD_FLAG_JLMHST_ENABLED)
+
+/* ACCUMULATE_SPIN_TIME */
+#define ACCUMULATE_SPIN_TIME(spinTime, endSpinTime, startSpinTime, endPauseSpinTime, startPauseSpinTime) \
+ \
+	/* accumulate spin interval in monitor:                                                                     \
+	     - again delta could be negative if CPU clocks not sync, and thread has moved to another processor      \
+	     - also the spin start time will be zero if no spinning has occurred. This is a convention              \
+	*/                                                                                                          \
+	if ((startSpinTime) > 0) {                                                                                  \
+		/* must be declared as a local variable in the C function from which this is called */                    \
+		deltaTime = (TIME_DELTA) ((endSpinTime) - (startSpinTime));                                               \
+	                                                                                                            \
+		if (deltaTime > 0) {                                           													                  \
+			(spinTime) += (TIME) deltaTime;                                                             \
+			deltaTime = (TIME_DELTA) ((endPauseSpinTime) - (startPauseSpinTime));                       \
+			if ((spinTime) > deltaTime) {                                                               \
+				(spinTime) -= deltaTime; /* assumes gc can't run once spinning on try_enter starts */   \
+			}                                                                                           \
+		}
+
+#endif /* threaddef_h */

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrhelp.asm
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrhelp.asm?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrhelp.asm (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrhelp.asm Wed Nov 30 21:29:27 2005
@@ -0,0 +1,105 @@
+; 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.
+
+	.586p
+       	assume cs:flat,ds:flat,ss:flat
+       	.xmm
+eq_hy_null equ 0
+eq_HyThreadMonitor_pinCount equ 28
+eq_pointer_size equ 4
+eqS_current_stack_depth equ 16
+eqS_hythread_monitor_pin equ 16
+eqS_hythread_monitor_unpin equ 16
+eqSR_current_stack_depth equ 2
+eqSR_hythread_monitor_pin equ 2
+eqSR_hythread_monitor_unpin equ 2
+eqSRS_current_stack_depth equ 8
+eqSRS_hythread_monitor_pin equ 8
+eqSRS_hythread_monitor_unpin equ 8
+eqSS_current_stack_depth equ 64
+eqSS_hythread_monitor_pin equ 64
+eqSS_hythread_monitor_unpin equ 64
+       	CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
+       	CONST ends
+       	_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
+        public hythread_monitor_pin
+        public current_stack_depth
+        public hythread_monitor_unpin
+        align 16
+current_stack_depth    	PROC NEAR
+        ;  localStackUse = 16
+        push EBP
+        mov EBP,ESP
+        push EBX
+        sub ESP,64
+        mov EBX,EBP
+        jmp short L2
+L1:
+        mov EBX,ECX
+L2:
+        mov ECX,dword ptr [EBX]
+        test ECX,ECX                             ; setFlags: true
+        jnz short L1
+        sub EBX,EBP
+        mov ECX,EBX
+        mov EAX,EBX                              ; RegReg opt
+        add ESP,64
+        pop EBX
+        pop EBP
+        ret
+current_stack_depth        ENDP
+; Prototype: void hythread_monitor_pin( hythread_monitor_t monitor, hythread_t osThread);
+; Defined in: #THREAD Args: 2
+        align 16
+hythread_monitor_pin   	PROC NEAR
+        ;  localStackUse = 16
+        push EBP
+        mov EBP,ESP
+        push EBX
+        sub ESP,64
+        mov EBX,dword ptr (eqSRS_hythread_monitor_pin+0+8+eqSS_hythread_monitor_pin)[ESP]
+        mov EBX,dword ptr (eqSRS_hythread_monitor_pin+0+4+eqSS_hythread_monitor_pin)[ESP]
+lockFixup3:
+CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST'
+        dd offset flat:lockFixup3
+CONST$_LOCKFIXUPS_B ends
+        lock inc  dword ptr eq_HyThreadMonitor_pinCount[EBX] ;  (Converted add 1 to inc)
+        add ESP,64
+        pop EBX
+        pop EBP
+        ret
+hythread_monitor_pin        ENDP
+; Prototype: void hythread_monitor_unpin( hythread_monitor_t monitor, hythread_t osThread);
+; Defined in: #THREAD Args: 2
+        align 16
+hythread_monitor_unpin 	PROC NEAR
+        ;  localStackUse = 16
+        push EBP
+        mov EBP,ESP
+        push EBX
+        sub ESP,64
+        mov EBX,dword ptr (eqSS_hythread_monitor_unpin+0+8+eqSRS_hythread_monitor_unpin)[ESP]
+        mov EBX,dword ptr (eqSS_hythread_monitor_unpin+0+eqSRS_hythread_monitor_unpin+4)[ESP]
+lockFixup4:
+CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST'
+        dd offset flat:lockFixup4
+CONST$_LOCKFIXUPS_B ends
+        lock dec dword ptr eq_HyThreadMonitor_pinCount[EBX] ;  (Converted subtract 1 to dec)
+        add ESP,64
+        pop EBX
+        pop EBP
+        ret
+hythread_monitor_unpin        ENDP
+       	_TEXT ends
+       	end

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrprof.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrprof.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrprof.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrprof.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,300 @@
+/* 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 Thread
+ */
+
+
+/*
+ *	the following must come before the standard includes because thrdsup.h 
+ *	includes windows.h in Win32.
+ */
+#include "thrdsup.h"
+
+#include "hythread.h"
+#include "thrtypes.h"
+
+#define CDEV_CURRENT_FUNCTION _prototypes_private
+
+void paint_stack PROTOTYPE ((hythread_t thread));
+
+#undef CDEV_CURRENT_FUNCTION
+
+extern UDATA current_stack_depth PROTOTYPE ((void));
+
+#define STACK_PATTERN 0xBAADF00D
+
+#define CDEV_CURRENT_FUNCTION hythread_get_flags
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_cpu_time
+/**
+ * Return the amount of CPU time used by a thread.
+ * 
+ * @param[in] thread
+ * @return actual time on CPU used by thread (nanoseconds) or
+ * negative value if not supported.
+ */
+I_64 VMCALL
+hythread_get_cpu_time (hythread_t thread)
+{
+
+#if defined(WIN32)
+  FILETIME creationTime, exitTime, kernelTime, userTime;
+  I_64 totalTime;
+  /* WARNING! Not supported on Win95!  Need to test to ensure this fails gracefully */
+  if (GetThreadTimes
+      (thread->handle, &creationTime, &exitTime, &kernelTime, &userTime))
+    {
+      totalTime =
+	((I_64) kernelTime.
+	 dwLowDateTime | ((I_64) kernelTime.dwHighDateTime << 32)) +
+	((I_64) userTime.
+	 dwLowDateTime | ((I_64) userTime.dwHighDateTime << 32));
+      /* totalTime is in 100's of nanos.  Convert to nanos */
+      return totalTime * 100;
+    }
+#endif /* WIN32 */
+
+  return -1;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_handle
+/** 
+ * Return the OS handle for a thread.
+ * 
+ * @param thread a thread
+ * @return OS handle
+ */
+UDATA VMCALL
+hythread_get_handle (hythread_t thread)
+{
+  return (UDATA) thread->handle;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_enable_stack_usage
+/**
+ * Enable or disable monitoring of stack usage.
+ * 
+ * @param[in] enable 0 to disable or non-zero to enable.
+ * @return none
+ * 
+ */
+void VMCALL
+hythread_enable_stack_usage (UDATA enable)
+{
+  hythread_library_t lib = GLOBAL_DATA (default_library);
+  lib->stack_usage = enable;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_stack_usage
+/** 
+ * Return the approximate stack usage by a thread
+ * 
+ * @param[in] thread a thread 
+ * @return 0 if the stack has not been painted<br>
+ * (UDATA)-1 if the stack has overflowed<br>
+ *  otherwise the approximate maximum number of bytes used on the stack
+ */
+UDATA VMCALL
+hythread_get_stack_usage (hythread_t thread)
+{
+#if defined(LINUX)
+  return 0;
+#else
+  UDATA *tos = thread->tos;
+  UDATA count = thread->stacksize;
+  if (tos == NULL || count == 0)
+    {
+      return 0;
+    }
+  if (*tos != STACK_PATTERN)
+    {
+      return (UDATA) - 1;
+    }
+  while (*tos++ == STACK_PATTERN)
+    {
+      count -= sizeof (UDATA);
+    }
+  return count;
+#endif
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION paint_stack
+/*
+ * Paint a thread's stack.
+ * 
+ * Attempt to paint the stack region with STACK_PATTERN so we can
+ * detect stack usage.  Sets thread->tos to the maximum stack
+ * address.
+ * @note This won't work on PA-RISC because of backwards stacks
+ * 
+ * @param thread a thread
+ * @return none
+ */
+void
+paint_stack (hythread_t thread)
+{
+#if defined(LINUX)
+  /* z/OS and Linux don't let us set the stack size, so we can't paint the stack safely */
+#elif defined(WIN32)
+  MEMORY_BASIC_INFORMATION memInfo;
+  SYSTEM_INFO sysInfo;
+  UDATA *curr;
+  UDATA *stack = (UDATA *) & stack;
+  /* Find out where the stack starts. */
+  VirtualQuery (stack, &memInfo, sizeof (MEMORY_BASIC_INFORMATION));
+  /* Start painting. Skip the top 32 slots (to protect this stack frame) */
+  curr = stack - 32;
+  __try
+  {
+    while (curr > (UDATA *) memInfo.AllocationBase)
+      *curr-- = STACK_PATTERN;
+  }
+  __except (1)
+  {
+    /* Ran off the end of the stack. Stop */
+  }
+  thread->tos = curr + 1;
+  /* Round up to the system page size. */
+  GetSystemInfo (&sysInfo);
+  thread->stacksize =
+    ((UDATA) stack - (UDATA) thread->tos +
+     sysInfo.dwPageSize) & ~(sysInfo.dwPageSize - 1);
+#else
+  IDATA maxStack, stackSize, index;
+  UDATA *stack = (UDATA *) & stack;
+  stackSize = thread->stacksize - current_stack_depth ();
+  maxStack = stackSize / sizeof (UDATA) - 32;
+  if (maxStack <= 0)
+    {
+      return;
+    }
+  thread->tos = stack - maxStack;
+  /* don't paint the top 32 slots (to protect this stack frame) */
+  for (index = 32; index <= maxStack; index++)
+    {
+      *(stack - index) = STACK_PATTERN;
+    }
+#endif
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_stack_size
+/**
+ * Returns a thread's stack size.
+ * 
+ * @param[in] thread a thread
+ * @return 0 if the thread is an attached thread
+ * or the initial size of the thread's stack,
+ * 
+ */
+UDATA VMCALL
+hythread_get_stack_size (hythread_t thread)
+{
+  return thread->stacksize;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_os_priority
+/**
+ * Return the OS's scheduling policy and priority for a thread.
+ *
+ * Query the OS to determine the actual priority of the specified thread.
+ * The priority and scheduling policy are stored in the pointers provided.
+ * On Windows the "policy" contains the thread's priority class.
+ * On POSIX systems it contains the scheduling policy
+ * On OS/2 no information is available.  0 is stored in both pointers.
+ *
+ * @param[in] thread a thread
+ * @param[in] policy pointer to location where policy will be stored (non-NULL)
+ * @param[in] priority pointer to location where priority will be stored (non-NULL)
+ * @return 0 on success or negative value on failure
+ */
+IDATA VMCALL
+hythread_get_os_priority (hythread_t thread, IDATA * policy, IDATA * priority)
+{
+#if defined(HY_POSIX_THREADS)
+  struct sched_param sched_param;
+  int osPolicy, rc;
+  rc = pthread_getschedparam (thread->handle, &osPolicy, &sched_param);
+  if (rc)
+    return -1;
+  *priority = sched_param.sched_priority;
+  *policy = osPolicy;
+#else
+#if defined(WIN32)
+  *priority = GetThreadPriority (thread->handle);
+  if (*priority == THREAD_PRIORITY_ERROR_RETURN)
+    return -1;
+
+  *policy = GetPriorityClass (thread->handle);
+  if (*policy == 0)
+    return -1;
+#else
+
+#error Unknown platform
+
+#endif /* HY_POSIX_THREADS */
+#endif /* HYEPOC32 */
+
+  return 0;
+}
+
+#undef CDEV_CURRENT_FUNCTION
+
+#define CDEV_CURRENT_FUNCTION hythread_get_user_time
+/**
+ * Return the amount of USER time used by a thread.
+ * 
+ * @param[in] thread
+ * @return actual time on USER used by thread (nanoseconds) or
+ * negative value if not supported.
+ */
+I_64 VMCALL
+hythread_get_user_time (hythread_t thread)
+{
+
+#if defined(WIN32)
+  FILETIME creationTime, exitTime, kernelTime, userTime;
+  I_64 totalTime;
+  /* WARNING! Not supported on Win95!  Need to test to ensure this fails gracefully */
+  if (GetThreadTimes
+      (thread->handle, &creationTime, &exitTime, &kernelTime, &userTime))
+    {
+      totalTime =
+	((I_64) userTime.
+	 dwLowDateTime | ((I_64) userTime.dwHighDateTime << 32));
+      /* totalTime is in 100's of nanos.  Convert to nanos */
+      return totalTime * 100;
+    }
+#endif /* WIN32 */
+
+  return -1;
+}
+
+#undef CDEV_CURRENT_FUNCTION

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrspinlock.asm
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrspinlock.asm?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrspinlock.asm (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrspinlock.asm Wed Nov 30 21:29:27 2005
@@ -0,0 +1,121 @@
+; 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.
+
+	.586p
+       	assume cs:flat,ds:flat,ss:flat
+       	.xmm
+eq_HyThreadAbstractMonitor_spinCount1 equ 48
+eq_HyThreadAbstractMonitor_spinCount2 equ 52
+eq_HyThreadAbstractMonitor_spinCount3 equ 56
+eq_HyThreadAbstractMonitor_spinlockState equ 40
+eq_pointer_size equ 4
+eqS_hythread_spinlock_acquire equ 18
+eqS_hythread_spinlock_swapState equ 16
+eqSR_hythread_spinlock_acquire equ 3
+eqSR_hythread_spinlock_swapState equ 2
+eqSRS_hythread_spinlock_acquire equ 12
+eqSRS_hythread_spinlock_swapState equ 8
+eqSS_hythread_spinlock_acquire equ 72
+eqSS_hythread_spinlock_swapState equ 64
+HYTHREAD_MONITOR_SPINLOCK_OWNED equ 1
+HYTHREAD_MONITOR_SPINLOCK_UNOWNED equ 0
+       	CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
+       	CONST ends
+       	_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
+        extrn hythread_yield:near
+        public hythread_spinlock_acquire
+        public hythread_spinlock_swapState
+; Prototype: IDATA hythread_spinlock_acquire(hythread_t self, hythread_monitor_t monitor);
+; Defined in: #THREAD Args: 2
+        align 16
+hythread_spinlock_acquire      	PROC NEAR
+        ;  localStackUse = 18
+        push EBP
+        mov EBP,ESP
+        push EBX
+        push ESI
+        sub ESP,72
+        mov EDX,dword ptr (eqSS_hythread_spinlock_acquire+0+eqSRS_hythread_spinlock_acquire+8)[ESP]
+        mov ECX,dword ptr eq_HyThreadAbstractMonitor_spinCount3[EDX]
+L2:
+        mov EBX,dword ptr eq_HyThreadAbstractMonitor_spinCount2[EDX]
+L3:
+; Try to cmpxchg 0 into the target field (-1 indicates free)
+        cmp dword ptr eq_HyThreadAbstractMonitor_spinlockState[EDX],HYTHREAD_MONITOR_SPINLOCK_UNOWNED ; setFlags: true
+        jne short L10
+        xor EAX,EAX
+        mov ESI,HYTHREAD_MONITOR_SPINLOCK_OWNED
+lockFixup12:
+CONST$_LOCKFIXUPS_B SEGMENT DWORD USE32 PUBLIC 'CONST'
+        dd offset flat:lockFixup12
+CONST$_LOCKFIXUPS_B ends
+        lock cmpxchg dword ptr eq_HyThreadAbstractMonitor_spinlockState[EDX],ESI
+        test EAX,EAX                             ; setFlags: true
+        jnz short L10
+        xor EBX,EBX
+        jmp short L1
+L10:
+        dw 37107                                 ; PAUSE
+; begin tight loop
+        mov EAX,dword ptr eq_HyThreadAbstractMonitor_spinCount1[EDX]
+L11:
+; inside tight loop
+        dec EAX                                  ; setFlags: true(Converted subtract 1 to dec)
+        jnz short L11
+; end tight loop
+        dec EBX                                  ; setFlags: true(Converted subtract 1 to dec)
+        jnz short L3
+        mov dword ptr 64[ESP],ECX                ; save VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3)
+        mov dword ptr 68[ESP],EDX                ; save VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire
+        call hythread_yield
+        mov ECX,dword ptr 64[ESP]                ; load VMtemp3_1_3_(HyThreadAbstractMonitor->spinCount3)
+        dec ECX                                  ; setFlags: true(Converted subtract 1 to dec)
+        mov EDX,dword ptr 68[ESP]                ; load VMtemp3_1_2_(struct HyThreadAbstractMonitor*) in_HyVMThreadSpinlocks>>#hythread_spinlock_acquire
+        jnz short L2
+        mov EBX,-1
+L1:
+        mov EAX,EBX
+        add ESP,72
+        pop ESI
+        pop EBX
+        pop EBP
+        ret
+hythread_spinlock_acquire        ENDP
+; Prototype: UDATA hythread_spinlock_swapState(hythread_monitor_t monitor, UDATA newState);
+; Defined in: #THREAD Args: 2
+        align 16
+hythread_spinlock_swapState    	PROC NEAR
+        ;  localStackUse = 16
+        push EBP
+        mov EBP,ESP
+        push EBX
+        sub ESP,64
+        mov EBX,dword ptr (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+4)[ESP]
+        mov ECX,dword ptr (eqSS_hythread_spinlock_swapState+0+eqSRS_hythread_spinlock_swapState+8)[ESP]
+; If we are writing in UNOWNED, we are exiting the critical section, therefore
+; have to finish up any writes
+        test ECX,ECX                             ; setFlags: true
+        ; memory barrier (no code necessary for write barriers)
+        xchg dword ptr eq_HyThreadAbstractMonitor_spinlockState[EBX],ECX
+; if we entered the critical section, (i.e. we swapped out UNOWNED) then
+; we have to issue a readBarrier
+        test ECX,ECX                             ; setFlags: true
+        mov EAX,ECX
+        add ESP,64
+        pop EBX
+        pop EBP
+        ret
+hythread_spinlock_swapState        ENDP
+       	_TEXT ends
+       	end

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrtypes.h
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrtypes.h?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrtypes.h (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/thread/thrtypes.h Wed Nov 30 21:29:27 2005
@@ -0,0 +1,135 @@
+/* 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(THRTYPES_H)
+#define THRTYPES_H
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+
+#include "hythread.h"
+  typedef struct HyThread
+  {
+    struct HyThreadLibrary *library;
+    UDATA attachcount;
+    UDATA priority;
+    struct HyThreadMonitor *monitor;
+    struct HyThread *next;
+    void *tls[128];
+    hythread_entrypoint_t entrypoint;
+    void *entryarg;
+    UDATA flags;
+    UDATA tid;
+    struct HyThread *interrupter;
+    OSTHREAD handle;
+    COND condition;
+    MUTEX mutex;
+    UDATA stacksize;
+    UDATA *tos;
+  } HyThread;
+
+#define HYSIZEOF_HyThread 572
+
+  typedef struct HyThreadMonitor
+  {
+    UDATA count;
+    struct HyThread *owner;
+    struct HyThread *waiting;
+    UDATA flags;
+    UDATA userData;
+    struct HyThreadMonitorTracing *tracing;
+    char *name;
+    UDATA pinCount;
+    UDATA antiDeflationCount;
+    UDATA proDeflationCount;
+    UDATA spinlockState;
+    UDATA lockingWord;
+    UDATA spinCount1;
+    UDATA spinCount2;
+    UDATA spinCount3;
+    struct HyThread *blocking;
+    MUTEX mutex;
+  } HyThreadMonitor;
+
+#define HYSIZEOF_HyThreadMonitor sizeof(HyThreadMonitor)
+
+  typedef struct HyThreadMonitorPool
+  {
+    struct HyThreadMonitorPool *next;
+    struct HyThreadMonitor *next_free;
+    struct HyThreadMonitor entries[64];
+  } HyThreadMonitorPool;
+
+#define MONITOR_POOL_SIZE  64
+
+#define HYSIZEOF_HyThreadMonitorPool 4360
+
+  typedef struct HyThreadGlobal
+  {
+    struct HyThreadGlobal *next;
+    char *name;
+    UDATA data;
+  } HyThreadGlobal;
+
+#define HYSIZEOF_HyThreadGlobal 12
+
+  typedef struct HyThreadLibrary
+  {
+    UDATA spinlock;
+    struct HyThreadMonitorPool *monitor_pool;
+    struct HyPool *thread_pool;
+    UDATA threadCount;
+    UDATA stack_usage;
+    IDATA initStatus;
+    UDATA flags;
+    struct HyThreadMonitorTracing *gc_lock_tracing;
+    struct HyThreadGlobal *globals;
+    struct HyPool *global_pool;
+    MUTEX global_mutex;
+    TLSKEY self_ptr;
+    MUTEX monitor_mutex;
+    MUTEX tls_mutex;
+    hythread_tls_finalizer_t tls_finalizers[128];
+    char *thread_weight;
+    struct HyPool *monitor_tracing_pool;
+    struct HyPool *thread_tracing_pool;
+  } HyThreadLibrary;
+
+#define HYTHREAD_LIB_FLAG_JLMHST_ENABLED  0x10000
+#define HYTHREAD_LIB_FLAG_JLM_ENABLED  0x4000
+#define HYTHREAD_LIB_FLAG_JLM_ENABLED_ALL  0x1C000
+#define HYTHREAD_LIB_FLAG_JLM_HAS_BEEN_ENABLED  0x20000
+#define HYTHREAD_LIB_FLAG_JLMTS_ENABLED  0x8000
+#define HYSIZEOF_HyThreadLibrary 580
+
+  typedef struct HySemaphore
+  {
+    OSSEMAPHORE sem;
+  } HySemaphore;
+
+#define HYSIZEOF_HySemaphore 4
+#define STACK_DEFAULT_SIZE  0x8000
+#define FREE_TAG ((UDATA)-1)
+
+  typedef struct HyThreadMonitorPool *hythread_monitor_pool_t;
+  typedef struct HyThreadLibrary *hythread_library_t;
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif				/* THRTYPES_H */

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/DoxygenSupport.txt
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/DoxygenSupport.txt?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/DoxygenSupport.txt (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/DoxygenSupport.txt Wed Nov 30 21:29:27 2005
@@ -0,0 +1,33 @@
+/* Copyright 2004 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.
+ */
+
+/*
+ * This file provides the group definitions required to create the Doxygen generated
+ * output for compounds.  There is one group per directory (port, pool, thread, etc.).
+ */
+ 
+/**
+ * @defgroup VMInterface VM Interface
+ * @brief The C VM Interface between \ref HarmonyNatives "Harmony natives" and the Java VM.
+ *
+ * The VM Interface must be implemented by the JVM vendor to support the \ref HarmonyNatives "Harmony class library natives".
+ * The VM vendor must export the following <a href='vmi_8h.html#VMIExports'>functions</a> from 
+ * the VM-Interface shared library.  The JVM vendor is free to add additional exports to this
+ * library for initialization purposes.
+ *
+ * The current implementation contains several temporary <a href='vmi_8h.html#VMITemporary'>functions</a>
+ * that will be removed in an upcoming revision.  The implementation of these temporary functions
+ * is trivial and described in the individual function comments. 
+ */

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/makefile?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/makefile (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/makefile Wed Nov 30 21:29:27 2005
@@ -0,0 +1,66 @@
+# 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.
+
+#
+# Makefile for module 'vmi'
+#
+
+APPVER=4.0
+TARGETOS=WIN95
+_WIN32_IE=0x0500
+SEHMAP = TRUE
+!include <win32.mak>
+
+DLLFILENAME=vmi.dll# declaration
+
+DLLNAME=..\vmi.dll# declaration
+
+LIBNAME=vmi# declaration
+
+LIBPATH=..\lib\# declaration
+
+.c.obj:
+	$(cc) -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 $(cflags) -D_MT -D_DLL -MD -D_WINSOCKAPI_ -DWIN32 -Ogityb1 -Gs -GF -Zm400 -WX -Zi  /I..\include  $(VMDEBUG) $*.c
+
+.cpp.obj:
+	$(cc) -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 $(cflags) -D_MT -D_DLL -MD -D_WINSOCKAPI_ -DWIN32 -Ogityb1 -Gs -GF -Zm400 -WX -Zi  /I..\include  $(VMDEBUG) $*.cpp
+
+.asm.obj:
+	ml /c /Cp /W3 /nologo /coff /Zm /Zd /Zi /Gd  $(VMASMDEBUG) -DWIN32  $<
+
+.rc.res:
+	rc -I..\include $<
+
+BUILDFILES1 = vmi_copyright.obj vmi.obj
+
+VIRTFILES1 = vmi.res
+
+MDLLIBFILES1 = 
+
+all: \
+	 ..\lib\$(LIBNAME).lib
+
+BUILDLIB: $(LIBPATH)$(LIBNAME).lib
+
+$(LIBPATH)$(LIBNAME).lib:\
+	$(BUILDFILES1) $(VIRTFILES1) $(MDLLIBFILES1) 
+	$(implib) /NOLOGO -subsystem:windows -out:$(LIBPATH)$(LIBNAME).lib -def:$(LIBNAME).def -machine:$(CPU) \
+	$(BUILDFILES1) $(VIRTFILES1) $(MDLLIBFILES1) 
+
+clean:
+	-del *.obj
+	-del *.pdb
+	-del *.res
+	-del $(LIBPATH)$(LIBNAME).lib
+	-del $(LIBPATH)$(LIBNAME).exp

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,48 @@
+/* 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.
+ */
+
+#include "vmi.h"
+
+	/** NOTE NOTE NOTE **
+	 * The functions below must be implemented by the VM vendor.
+	 * This stub implementation is non-functional, provided for the purposes of
+	 * building the dependent natives.
+	 */
+
+/**
+ * Extract the VM Interface from a JNI JavaVM
+ *
+ * @param[in] vm  The JavaVM to query
+ *
+ * @return a VMInterface pointer
+ */
+VMInterface* JNICALL 
+VMI_GetVMIFromJavaVM(JavaVM* vm)
+{
+	return NULL;
+}
+	
+/**
+ * Extract the VM Interface from a JNIEnv
+ *
+ * @param[in] vm  The JNIEnv to query
+ *
+ * @return a VMInterface pointer
+ */
+VMInterface* JNICALL 
+VMI_GetVMIFromJNIEnv(JNIEnv* env)
+{
+	return NULL;
+}	

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.def
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.def?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.def (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.def Wed Nov 30 21:29:27 2005
@@ -0,0 +1,10 @@
+LIBRARY	VMI
+
+SECTIONS
+	.data	READ WRITE
+	.text	EXECUTE READ
+
+EXPORTS
+	VMI_GetVMIFromJavaVM
+	VMI_GetVMIFromJNIEnv
+

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.rc
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.rc?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.rc (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi.rc Wed Nov 30 21:29:27 2005
@@ -0,0 +1,47 @@
+;
+; 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.
+;
+
+#include <windows.h>
+#include <winver.h>
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 0,1,0,0
+ PRODUCTVERSION 0,1,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEFLAGS 0x0L
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE 0x0L
+BEGIN
+	BLOCK "StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+			VALUE "CompanyName", "The Apache Software Foundation.\0"
+			VALUE "FileDescription", "VMI native code\0"
+			VALUE "FileVersion", "0.1\0"
+			VALUE "InternalName", "vmi\0"
+			VALUE "LegalCopyright", "(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable.\0"
+			VALUE "OriginalFilename", "vmi.dll\0"
+			VALUE "ProductName", "Apache Harmony\0"
+			VALUE "ProductVersion", "0.1\0"
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi_copyright.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi_copyright.c?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi_copyright.c (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/vmi/vmi_copyright.c Wed Nov 30 21:29:27 2005
@@ -0,0 +1,19 @@
+/* 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.
+ */
+
+/* A copyright string included in each DLL and executable */
+
+const char hyCopyright[] =
+	"(c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable.";

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/DoxygenSupport.txt
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/DoxygenSupport.txt?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/DoxygenSupport.txt (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/DoxygenSupport.txt Wed Nov 30 21:29:27 2005
@@ -0,0 +1,26 @@
+/* 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.
+ */
+
+/*
+ * This file provides the group definitions required to create the Doxygen generated
+ * output for compounds.  There is one group per directory (port, pool, thread, etc.).
+ */
+ 
+/**
+ * @defgroup ZipSupport Zip Support
+ * @brief Zip file  support for the Java VM.
+ */
+
+

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip.nls
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip.nls?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip.nls (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip.nls Wed Nov 30 21:29:27 2005
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+# Externalised messages for the VM components.
+#
+# Note to developers:
+#
+# New messages MUST be added at the end of this file.
+# DO NOT delete messages from this file, as it will change their indices.
+# If you wish to remove a message, delete its text, but leave the key in place
+#
+# Note to translators:
+#
+# This file uses printf style substitutions. Sequences such as %s, %.*s, %10d
+# etc. will be subsituted at runtime. The special case of %% is not a substitution.
+# It indicates a single percent sign. Please do not modify the format specifiers, or 
+# change their order. For instance, in a message like "from %d to %s", %d
+# MUST appear before %s in any translated message, or a run-time crash
+# could occur. This is a known limitation of the product.
+#
+# NLS_MESSAGEFORMAT_NONE
+#
+
+HYNLS.MODULE=ZIPS
+HYNLS.HEADER=hyzipnls.h
+
+# first argument is the name of the zip DLL
+# second argument is a platform error message
+HYNLS_ZIP_UNABLE_TO_OPEN_ZIP_DLL=Unable to open %1$s (%2$s)
+
+HYNLS_ZIP_MISSING_EXPORT=Unable to open %s (Missing export)
+
+

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_ca.nls
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_ca.nls?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_ca.nls (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_ca.nls Wed Nov 30 21:29:27 2005
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+# Externalised messages for the VM components.
+# New messages MUST be added at the end of this file.
+# DO NOT delete messages from this file, as it will change their indices.
+# If you wish to remove a message, delete its text, but leave the key in place
+# NLS_MESSAGEFORMAT_NONE
+
+HYNLS.MODULE=ZIPS
+HYNLS.HEADER=hyzipnls.h
+
+# first argument is the name of the zip DLL
+# second argument is a platform error message
+HYNLS_ZIP_UNABLE_TO_OPEN_ZIP_DLL=No es pot obrir %1$s (%2$s)
+
+HYNLS_ZIP_MISSING_EXPORT=No es pot obrir %s (falta l'exportaci\u00f3)
+
+
+

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_cs.nls
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_cs.nls?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_cs.nls (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_cs.nls Wed Nov 30 21:29:27 2005
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+# Externalised messages for the VM components.
+# New messages MUST be added at the end of this file.
+# DO NOT delete messages from this file, as it will change their indices.
+# If you wish to remove a message, delete its text, but leave the key in place
+# NLS_MESSAGEFORMAT_NONE
+
+HYNLS.MODULE=ZIPS
+HYNLS.HEADER=hyzipnls.h
+
+# first argument is the name of the zip DLL
+# second argument is a platform error message
+HYNLS_ZIP_UNABLE_TO_OPEN_ZIP_DLL=Nelze otev\u0159\u00edt %1$s (%2$s)
+
+HYNLS_ZIP_MISSING_EXPORT=Nelze otev\u0159\u00edt %s (chyb\u011bj\u00edc\u00ed export)
+
+
+

Added: incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_de.nls
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_de.nls?rev=350181&view=auto
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_de.nls (added)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/ibm_core/native-src/win.IA32/zip/hyzip_de.nls Wed Nov 30 21:29:27 2005
@@ -0,0 +1,33 @@
+#
+# 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.
+#
+
+# Externalised messages for the VM components.
+# New messages MUST be added at the end of this file.
+# DO NOT delete messages from this file, as it will change their indices.
+# If you wish to remove a message, delete its text, but leave the key in place
+# NLS_MESSAGEFORMAT_NONE
+
+HYNLS.MODULE=ZIPS
+HYNLS.HEADER=hyzipnls.h
+
+# first argument is the name of the zip DLL
+# second argument is a platform error message
+HYNLS_ZIP_UNABLE_TO_OPEN_ZIP_DLL=%1$s kann nicht ge\u00f6ffnet werden (%2$s)
+
+HYNLS_ZIP_MISSING_EXPORT=%s kann nicht ge\u00f6ffnet werden (fehlender Export).
+
+
+



Mime
View raw message