harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r523228 - in /harmony/enhanced/classlib/trunk/modules: luni/src/main/native/launcher/shared/ luni/src/main/native/launcher/unix/ luni/src/main/native/launcher/windows/ portlib/src/main/native/thrstub/ portlib/src/main/native/thrstub/shared/...
Date Wed, 28 Mar 2007 08:27:26 GMT
Author: hindessm
Date: Wed Mar 28 01:27:23 2007
New Revision: 523228

URL: http://svn.apache.org/viewvc?view=rev&rev=523228
Log:
New files for "[#HARMONY-3090] Create a new table based API for thread
library functions".  Note, that I've changed the unix library name to
HYTHR_0.2 (from HYTHR_0.1) to give more obvious failures if the wrong
library is used.

Added:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main_hlp.h
  (with props)
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c
  (with props)
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/windows/main_hlp.c
  (with props)
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.c
  (with props)
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.h
  (with props)
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/DoxygenSupport.txt
  (with props)
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/exports.txt
  (with props)
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/makefile
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/DoxygenSupport.txt
  (with props)
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.def
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.rc
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/makefile

Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main_hlp.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main_hlp.h?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main_hlp.h
(added)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main_hlp.h
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,36 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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(MAINHLP_H)
+#define MAINHLP_H
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+#include "hycomp.h"
+
+extern HY_CFUNC int main_get_executable_name PROTOTYPE((char *argv0, char **exeName));
+extern HY_CFUNC void *main_mem_allocate_memory PROTOTYPE((int byteAmount));
+extern HY_CFUNC void main_mem_free_memory PROTOTYPE((void *memoryPointer));
+extern HY_CFUNC int main_open_port_library PROTOTYPE((UDATA * descriptor));
+extern HY_CFUNC int main_close_port_library PROTOTYPE((UDATA descriptor));
+extern HY_CFUNC UDATA main_lookup_name PROTOTYPE((UDATA descriptor, char *name, UDATA * func));
+
+#if defined(__cplusplus)
+}
+#endif
+#endif                          /* MAINHLP_H */

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main_hlp.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c
(added)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,407 @@
+#include <stdlib.h>
+#include <sys/utsname.h>
+
+#include <sys/stat.h>
+#include <limits.h>
+#include <dirent.h>
+#include <errno.h>
+#include <string.h>
+#include <pwd.h>
+#include <sys/types.h>
+
+#if defined(LINUX)
+#include <sys/sysinfo.h>
+#endif
+#if defined(FREEBSD)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#endif
+
+#include <unistd.h>
+
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <dlfcn.h>
+
+
+#include "main_hlp.h"
+
+
+static BOOLEAN isSymbolicLink (char *filename);
+static IDATA cwdname (char **result);
+static IDATA readSymbolicLink (char *linkFilename, char **result);
+static IDATA searchSystemPath (char *filename, char **result);
+
+
+int 
+main_get_executable_name (char *argv0, char **result)
+{
+
+#if defined(LINUX)
+  return readSymbolicLink ("/proc/self/exe", result);
+#else
+  IDATA retval = -1;
+  IDATA length;
+  char *p;
+  char *currentName = NULL;
+  char *currentPath = NULL;
+  char *originalWorkingDirectory = NULL;
+
+  if (!argv0)
+    {
+      return -1;
+    }
+  currentPath = main_mem_allocate_memory(strlen (argv0) + 1);
+  if (currentPath)
+    {
+      strcpy(currentPath, argv0);
+    }
+  if (!currentPath)
+    {
+      retval = -1;
+      goto cleanup;
+    }
+  retval = cwdname(&originalWorkingDirectory);
+  if (retval)
+    {
+      retval = -1;
+      goto cleanup;
+    }
+gotPathName:
+  /* split path into directory part and filename part. */
+  p = strrchr (currentPath, '/');
+  if (p)
+    {
+      *p++ = '\0';
+      currentName = main_mem_allocate_memory(strlen (p) + 1);
+      if (!currentName)
+        {
+          retval = -1;
+          goto cleanup;
+        }
+      strcpy (currentName, p);
+    }
+  else
+    {
+      currentName = currentPath;
+      currentPath = NULL;
+      retval = searchSystemPath (currentName, &currentPath);
+      if (retval)
+        {
+          retval = -1;
+          goto cleanup;
+        }
+    }
+  /* go there */
+  if (currentPath)
+    {
+      if (currentPath[0])
+        {
+          if (0 != chdir (currentPath))
+            {
+              retval = -1;
+              goto cleanup;
+            }
+        }
+      main_mem_free_memory(currentPath);
+      currentPath = NULL;
+    }
+  if (isSymbolicLink (currentName))
+    {
+      /* try to follow the link. */
+      retval = readSymbolicLink (currentName, &currentPath);
+      if (retval)
+        {
+          retval = -1;
+          goto cleanup;
+        }
+      main_mem_free_memory(currentName);
+      currentName = NULL;
+      goto gotPathName;
+    }
+  retval = cwdname (&currentPath);
+  if (retval)
+    {
+      retval = -1;
+      goto cleanup;
+    }
+  /* Put name and path back together */
+  *result = main_mem_allocate_memory(strlen(currentPath) + strlen(currentName) + 2);
+  if (!*result)
+    {
+      retval = -1;
+      goto cleanup;
+    }
+  strcpy (*result, currentPath);
+  if (currentPath[0] && (currentPath[strlen (currentPath) - 1] != '/'))
+    {
+      strcat (*result, "/");
+    }
+  strcat (*result, currentName);
+  /* Finished. */
+  retval = 0;
+cleanup:
+  if (originalWorkingDirectory)
+    {
+      chdir (originalWorkingDirectory);
+      main_mem_free_memory(originalWorkingDirectory);
+      originalWorkingDirectory = NULL;
+    }
+  if (currentPath)
+    {
+      main_mem_free_memory(currentPath);
+      currentPath = NULL;
+    }
+  if (currentName)
+    {
+      main_mem_free_memory(currentName);
+      currentName = NULL;
+    }
+  return retval;
+#endif
+}
+
+void *
+main_mem_allocate_memory (int byteAmount)
+{
+	void *pointer = NULL;
+	void *mem;
+	if (byteAmount == 0)
+	{                           /* prevent malloc from failing causing allocate to return null
*/
+		byteAmount = 1;
+	}
+	pointer = malloc(byteAmount);
+	return pointer;
+}
+
+void 
+main_mem_free_memory (void *memoryPointer)
+{
+	free (memoryPointer);
+}
+
+
+/**
+ * @internal  Examines the named file to determine if it is a symbolic link.  On platforms
which don't have
+ * symbolic links (or where we can't tell) or if an unexpected error occurs, just answer
FALSE.
+ */
+static BOOLEAN
+isSymbolicLink (char *filename)
+{
+  struct stat statbuf;
+  if (!lstat (filename, &statbuf))
+    {
+      if (S_ISLNK (statbuf.st_mode))
+        {
+          return TRUE;
+        }
+    }
+  return FALSE;
+}
+
+/**
+ * @internal  Returns the current working directory.  
+ *
+ * @return 0 on success, -1 on failure.
+ *
+ * @note The buffer to hold this string (including its terminating NUL) is allocated with

+ * main_mem_allocate_memory.  The caller should free this memory with 
+ * main_mem_free_memory when it is no longer needed. 
+ */
+static IDATA
+cwdname (char **result)
+{
+  char *cwd;
+  int allocSize = 256;
+
+doAlloc:
+  cwd = main_mem_allocate_memory(allocSize);
+  if (!cwd)
+    {
+      return -1;
+    }
+  if (!getcwd (cwd, allocSize - 1))
+    {
+      main_mem_free_memory(cwd);
+      if (errno == ERANGE)
+        {
+          allocSize += 256;
+          goto doAlloc;
+        }
+      return -1;
+    }
+  *result = cwd;
+  return 0;
+}
+
+
+/**
+ * @internal  Attempts to read the contents of a symbolic link.  (The contents are the relative
pathname of
+ * the thing linked to).  A buffer large enough to hold the result (and the terminating NUL)
is
+ * allocated with main_mem_allocate_memory.  The caller should free this buffer with
+ * main_mem_free_memory when it is no longer needed.
+ * On success, returns 0.  On error, returns -1.
+ */
+static IDATA
+readSymbolicLink (char *linkFilename,
+                  char **result)
+{
+  /* TODO: remove this ifdef and find out what other builds break (if any) */
+#if defined(LINUX)
+  char fixedBuffer[PATH_MAX + 1];
+  int size = readlink (linkFilename, fixedBuffer, sizeof (fixedBuffer) - 1);
+  if (size <= 0)
+    {
+      return -1;
+    }
+  fixedBuffer[size++] = '\0';
+  *result = main_mem_allocate_memory(size);
+  if (!*result)
+    {
+      return -1;
+    }
+  strcpy (*result, fixedBuffer);
+  return 0;
+#else
+  return -1;
+#endif
+}
+
+
+/**
+ * @internal  Searches through the system PATH for the named file.  If found, it returns
the path entry
+ * which matched the file.  A buffer large enough to hold the proper path entry (without
a
+ * trailing slash, but with the terminating NUL) is allocated with main_mem_allocate_memory.
+ * The caller should free this buffer with main_mem_free_memory when it is no longer
+ * needed.  On success, returns 0.  On error (including if the file is not found), -1 is
returned.
+ */
+static IDATA
+searchSystemPath (char *filename, char **result)
+{
+  char *pathCurrent;
+  char *pathNext;
+  int length;
+  DIR *sdir = NULL;
+  struct dirent *dirEntry;
+  /* This should be sufficient for a single entry in the PATH var, though the var itself
*/
+  /* could be considerably longer.. */
+  char temp[PATH_MAX + 1];
+
+  if (!(pathNext = getenv ("PATH")))
+    {
+      return -1;
+    }
+
+  while (pathNext)
+    {
+      pathCurrent = pathNext;
+      pathNext = strchr (pathCurrent, ':');
+      if (pathNext)
+        {
+          length = (pathNext - pathCurrent);
+          pathNext += 1;
+        }
+      else
+        {
+          length = strlen (pathCurrent);
+        }
+      if (length > PATH_MAX)
+        {
+          length = PATH_MAX;
+        }
+      memcpy (temp, pathCurrent, length);
+      temp[length] = '\0';
+
+      if (!length)
+        {                       /* empty path entry */
+          continue;
+        }
+      if (sdir = opendir (temp))
+        {
+          while (dirEntry = readdir (sdir))
+            {
+              if (!strcmp (dirEntry->d_name, filename))
+                {
+                  closedir (sdir);
+                  /* found! */
+                  *result = main_mem_allocate_memory(strlen (temp) + 1);
+                  if (!result)
+                    {
+                      return -1;
+                    }
+                  strcpy (*result, temp);
+                  return 0;
+                }
+            }
+          closedir (sdir);
+        }
+    }
+  /* not found */
+  return -1;
+}
+
+/**
+ * Close a shared library.
+ *
+ * @param[in] descriptor Shared library handle to close.
+ *
+ * @return 0 on success, any other value on failure.
+ */
+int VMCALL
+main_close_port_library (UDATA descriptor)
+{
+  return (UDATA) dlclose ((void *)descriptor);
+}
+
+/** 
+ * Opens a shared library .
+ *
+ * @param[out] descriptor Pointer to memory which is filled in with shared-library handle
on success.
+ *
+ * @return 0 on success, any other value on failure.
+ *
+ * @note contents of descriptor are undefined on failure.
+ */
+#include <stdio.h>
+int VMCALL
+main_open_port_library (UDATA * descriptor)
+{
+  void *handle;
+  char *openName = "libhyprt.so";
+
+  handle = dlopen (openName, RTLD_NOW);
+  if (handle == NULL)
+    {
+puts(dlerror());
+	  return -1;
+    }
+
+  *descriptor = (UDATA) handle;
+  return 0;
+}
+
+
+/**
+ * Search for a function named 'name' taking argCount in the shared library 'descriptor'.
+ *
+ * @param[in] descriptor Shared library to search.
+ * @param[in] name Function to look up.
+ * @param[out] func Pointer to the function.
+ *
+ * @return 0 on success, any other value on failure.
+ *
+ * @note contents of func are undefined on failure.
+ */
+UDATA VMCALL
+main_lookup_name (UDATA descriptor, char *name, UDATA * func)
+{
+  void *address;
+  address = dlsym ((void *)descriptor, name);
+  if (address == NULL)
+    {
+      return 1;
+    }
+  *func = (UDATA) address;
+  return 0;
+}

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/windows/main_hlp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/windows/main_hlp.c?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/windows/main_hlp.c
(added)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/windows/main_hlp.c
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,171 @@
+#include <windows.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <malloc.h>
+
+#include "main_hlp.h"
+
+int
+main_get_executable_name (char *argv0, char **result)
+{
+	char *temp;
+	TCHAR osTemp[_MAX_PATH + 2];
+	DWORD length;
+
+	(void) argv0;			/* unused */
+
+	length = GetModuleFileName (NULL, osTemp, _MAX_PATH + 1);
+	if (!length || (length >= _MAX_PATH))
+	{
+		return -1;
+	}
+	osTemp[length] = (TCHAR) '\0';	/* jic */
+
+#if defined(UNICODE)
+	length =
+		WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, osTemp, -1, NULL, 0, NULL,
+				NULL);
+	temp = main_mem_allocate_memory (length + 1);
+	if (!temp)
+	{
+		return -1;
+	}
+	length =
+		WideCharToMultiByte (CP_ACP, WC_COMPOSITECHECK, osTemp, -1, temp, length,
+				NULL, NULL);
+#else
+	temp = main_mem_allocate_memory (length + 1);
+	if (!temp)
+	{
+		return -1;
+	}
+	strcpy (temp, osTemp);
+#endif
+
+*result = temp;
+return 0;
+}
+
+void *
+main_mem_allocate_memory(int byteAmount)
+{
+	void *pointer = NULL;
+	if (byteAmount == 0)
+	{				/* prevent GlobalLock from failing causing allocate to return null */
+		byteAmount = 1;
+	}
+	pointer = HeapAlloc (GetProcessHeap(), 0, byteAmount);
+	return pointer;
+}
+
+void
+main_mem_free_memory(void *memoryPointer)
+{
+	HeapFree (GetProcessHeap(), 0, memoryPointer);
+}
+
+#if !defined(HINSTANCE_ERROR)
+#define	HINSTANCE_ERROR	32
+#endif
+
+static UDATA
+EsSharedLibraryLookupName (UDATA descriptor, char *name, UDATA * func)
+{
+  UDATA lpfnFunction;
+
+  if (descriptor < HINSTANCE_ERROR)
+    {
+      return 3;
+    }
+  lpfnFunction =
+    (UDATA) GetProcAddress ((HINSTANCE) descriptor, (LPCSTR) name);
+  if (lpfnFunction == (UDATA) NULL)
+    {
+      return 4;
+    }
+  *func = lpfnFunction;
+  return 0;
+}
+
+/** 
+ * Opens the port library.
+ *
+ * @param[out] descriptor Pointer to memory which is filled in with shared-library handle
on success.
+ * 
+ * @return 0 on success, any other value on failure.
+ *
+ * @note contents of descriptor are undefined on failure.
+ */
+int
+main_open_port_library (UDATA * descriptor)
+{
+  HINSTANCE dllHandle;
+  UINT prevMode;
+
+  prevMode = SetErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS);
+
+  /* LoadLibrary will try appending .DLL if necessary */
+  dllHandle = LoadLibrary ("hyprt");
+  if (dllHandle >= (HINSTANCE) HINSTANCE_ERROR)
+    {
+      *descriptor = (UDATA) dllHandle;
+      SetErrorMode (prevMode);
+      return 0;
+    }
+  return -1;
+}
+
+/**
+ * Close the port library.
+ *
+ * @param[in] descriptor Shared library handle to close.
+ *
+ * @return 0 on success, any other value on failure.
+ */
+int 
+main_close_port_library (UDATA descriptor)
+{
+  if (descriptor < HINSTANCE_ERROR)
+    {
+      return 2;
+    }
+  FreeLibrary ((HINSTANCE) descriptor);
+  return 0;
+}
+
+/**
+ * Search for a function named 'name' taking argCount in the shared library 'descriptor'.
+ *
+ * @param[in] descriptor Shared library to search.
+ * @param[in] name Function to look up.
+ * @param[out] func Pointer to the function.
+ *
+ * @return 0 on success, any other value on failure.
+ *
+ * argSignature is a C (ie: NUL-terminated) string with the following possible values for
each character:
+ *
+ *		V	- void
+ *		Z	- boolean
+ *		B	- byte
+ *		C	- char (16 bits)
+ *		I	- integer (32 bits)
+ *		J	- long (64 bits)
+ *		F	- float (32 bits) 
+ *		D	- double (64 bits) 
+ *		L	- object / pointer (32 or 64, depending on platform)
+ *		P	- pointer-width platform data. (in this context an IDATA)
+ *
+ * Lower case signature characters imply unsigned value.
+ * Upper case signature characters imply signed values.
+ * If it doesn't make sense to be signed/unsigned (eg: V, L, F, D Z) the character is upper
case.
+ * 
+ * argList[0] is the return type from the function.
+ * The argument list is as it appears in english: list is left (1) to right (argCount)
+ *
+ * @note contents of func are undefined on failure.
+ */
+UDATA 
+main_lookup_name (UDATA descriptor, char *name, UDATA * func)
+{
+  return EsSharedLibraryLookupName (descriptor, name, func);
+}
\ No newline at end of file

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/windows/main_hlp.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.c?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.c
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.c
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,94 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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
+ * @brief Threading and synchronization support
+ */
+
+#include "hythread.h"
+#include <stdlib.h>
+
+/**
+ * @name Thread library startup and shutdown functions
+ * @anchor ThreadStartup
+ * Create, initialize, startup and shutdow the thread library
+ * @{
+ */
+/** Standard startup and shutdown (thread library allocated on stack or by application) 
*/
+HY_CFUNC I_32 VMCALL 
+hythread_create_library (struct HyThreadLibrary *threadLibrary,
+                                                     struct HyThreadLibraryVersion
+                                                     *version, UDATA size)
+{
+  return -1;
+}
+
+
+HY_CFUNC I_32 VMCALL 
+hythread_init_library (struct HyThreadLibrary *threadLibrary,
+                       struct HyThreadLibraryVersion *version, UDATA size)
+{
+  return -1;
+}
+
+HY_CFUNC I_32 VMCALL
+hythread_shutdown_library (struct HyThreadLibrary *threadLibrary)
+{
+	return -1;
+}
+
+HY_CFUNC I_32 VMCALL
+hythread_startup_library (struct HyThreadLibrary *threadLibrary)
+{
+  return -1;
+}
+
+/** Thread library self allocation routines */
+HY_CFUNC I_32 VMCALL
+hythread_allocate_library (struct HyThreadLibraryVersion*expectedVersion,
+                           struct HyThreadLibrary **threadLibrary)
+{
+  return -1;
+}
+
+/** @} */
+/**
+ * @name Thread library version and compatability queries
+ * @anchor ThreadVersionControl
+ * Determine thread library compatability and version.
+ * @{
+ */
+HY_CFUNC UDATA VMCALL
+hythread_getSize (struct HyThreadLibraryVersion *version)
+{
+  return 0;
+}
+
+HY_CFUNC I_32 VMCALL
+hythread_getVersion (struct HyThreadLibrary *threadLibrary,
+                     struct HyThreadLibraryVersion *version) 
+{
+  return -1;
+}
+
+HY_CFUNC I_32 VMCALL
+hythread_isCompatible (struct HyThreadLibraryVersion *expectedVersion)
+{
+  return -1;
+}

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.c
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.h?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.h
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.h
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,229 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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(HYTHREAD_H)
+#define HYTHREAD_H
+
+#if defined(__cplusplus)
+extern "C"
+{
+#endif
+#include <stddef.h>
+#include "hycomp.h"
+	
+/** @} */
+/**
+ * @name Thread library access
+ * @anchor ThreadAccess
+ * Macros for accessing thread library
+ * {
+ */
+	
+#define THREAD_ACCESS_FROM_ENV(jniEnv)\
+	VMInterface *threadPrivateVMI = VMI_GetVMIFromJNIEnv(jniEnv);\
+	HyPortLibrary *privatePortLibForThread = (*threadPrivateVMI)->GetPortLibrary(threadPrivateVMI);\
+	HyThreadLibrary *privateThreadLibrary = privatePortLibForThread->port_get_thread_library(privatePortLibForThread)
+
+#define THREAD_ACCESS_FROM_JAVAVM(javaVM) \
+	VMInterface *threadPrivateVMI =  VMI_GetVMIFromJavaVM(javaVM); \
+	HyPortLibrary *privatePortLibForThread = (*threadPrivateVMI)->GetPortLibrary(threadPrivateVMI);
\
+	HyThreadLibrary *privateThreadLibrary = privatePortLibForThread->port_get_thread_library(privatePortLibForThread)
+
+#define THREAD_ACCESS_FROM_VMI(vmi) HyPortLibrary *privatePortLibForThread = (*vmi)->GetPortLibrary(vmi);
\
+HyThreadLibrary *privateThreadLibrary = privatePortLibForThread->port_get_thread_library(privatePortLibForThread)
+
+#define THREAD_ACCESS_FROM_PORT(portLib) HyThreadLibrary *privateThreadLibrary = portLib->port_get_thread_library(portLib)
+
+#define THREAD_ACCESS_FROM_THREAD(threadLibrary) HyThreadLibrary *privateThreadLibrary =
threadLibrary
+
+#define THREADLIB privateThreadLibrary
+/** @} */
+
+typedef UDATA hythread_tls_key_t;
+
+#define HYTHREAD_PROC VMCALL
+
+#define HYTHREAD_MAJOR_VERSION_NUMBER  1
+#define HYTHREAD_MINOR_VERSION_NUMBER  0
+#define HYTHREAD_CAPABILITY_BASE  0
+#define HYTHREAD_CAPABILITY_STANDARD  1
+#define HYTHREAD_CAPABILITY_MASK ((U_64)(HYTHREAD_CAPABILITY_STANDARD))
+#define HYTHREAD_SET_VERSION(threadLibraryVersion, capabilityMask) \
+  (threadLibraryVersion)->majorVersionNumber = HYTHREAD_MAJOR_VERSION_NUMBER; \
+  (threadLibraryVersion)->minorVersionNumber = HYTHREAD_MINOR_VERSION_NUMBER; \
+  (threadLibraryVersion)->capabilities = (capabilityMask)
+#define HYTHREAD_SET_VERSION_DEFAULT(threadLibraryVersion) \
+  (threadLibraryVersion)->majorVersionNumber = HYTHREAD_MAJOR_VERSION_NUMBER; \
+  (threadLibraryVersion)->minorVersionNumber = HYTHREAD_MINOR_VERSION_NUMBER; \
+  (threadLibraryVersion)->capabilities = HYTHREAD_CAPABILITY_MASK
+
+
+typedef int (HYTHREAD_PROC * hythread_entrypoint_t) (void *);
+typedef struct HyThread *hythread_t;
+typedef struct HyThreadMonitor *hythread_monitor_t;
+typedef struct HySemaphore *hysem_t;
+
+typedef struct HyThreadMonitorTracing
+{
+	char *monitor_name;
+    UDATA enter_count;
+    UDATA slow_count;
+    UDATA recursive_count;
+    UDATA spin2_count;
+    UDATA yield_count;
+} HyThreadMonitorTracing;
+
+typedef struct HyThreadLibraryVersion
+{
+  U_16 majorVersionNumber;
+  U_16 minorVersionNumber;
+  U_32 padding;
+  U_64 capabilities;
+} HyThreadLibraryVersion;
+
+typedef struct HyThreadLibrary {
+  /** threadVersion */
+  struct HyThreadLibraryVersion threadVersion;
+
+  IDATA (PVMCALL sem_destroy) (struct HyThreadLibrary * threadLibrary, hysem_t s);
+  IDATA (PVMCALL sem_init) (struct HyThreadLibrary * threadLibrary, hysem_t * sp, I_32 initValue);
+  IDATA (PVMCALL sem_post) (struct HyThreadLibrary * threadLibrary, hysem_t s);
+  IDATA (PVMCALL sem_wait) (struct HyThreadLibrary * threadLibrary, hysem_t s);
+
+  IDATA (PVMCALL thread_attach) (struct HyThreadLibrary * threadLibrary, hythread_t * handle);
+  IDATA (PVMCALL thread_create) (struct HyThreadLibrary * threadLibrary, hythread_t * handle,
UDATA stacksize, UDATA priority,
+                UDATA suspend, hythread_entrypoint_t entrypoint,
+                void *entryarg);
+  void  (PVMCALL thread_detach) (struct HyThreadLibrary * threadLibrary, hythread_t thread);
+  void  (PVMCALL NORETURN thread_exit) (struct HyThreadLibrary * threadLibrary, hythread_monitor_t
monitor);
+
+  UDATA *(PVMCALL thread_global) (struct HyThreadLibrary * threadLibrary, char *name);
+
+  IDATA (PVMCALL thread_monitor_destroy) (struct HyThreadLibrary * threadLibrary, hythread_monitor_t
monitor);
+  IDATA (PVMCALL thread_monitor_enter) (struct HyThreadLibrary * threadLibrary, hythread_monitor_t
monitor);
+  IDATA (PVMCALL thread_monitor_exit) (struct HyThreadLibrary * threadLibrary, hythread_monitor_t
monitor);
+  IDATA (PVMCALL thread_monitor_init_with_name) (struct HyThreadLibrary * threadLibrary,
hythread_monitor_t * handle, UDATA flags, char *name);
+  IDATA (PVMCALL thread_monitor_notify) (struct HyThreadLibrary * threadLibrary, hythread_monitor_t
monitor);
+  IDATA (PVMCALL thread_monitor_notify_all) (struct HyThreadLibrary * threadLibrary, hythread_monitor_t
monitor);
+  IDATA (PVMCALL thread_monitor_wait) (struct HyThreadLibrary * threadLibrary, hythread_monitor_t
monitor);
+
+  hythread_t (PVMCALL thread_self) (struct HyThreadLibrary * threadLibrary);
+  IDATA (PVMCALL thread_sleep) (struct HyThreadLibrary * threadLibrary, I_64 millis);
+
+  IDATA (PVMCALL thread_tls_alloc) (struct HyThreadLibrary * threadLibrary, hythread_tls_key_t
* handle);
+  IDATA (PVMCALL thread_tls_free) (struct HyThreadLibrary * threadLibrary, hythread_tls_key_t
key);
+  void *(PVMCALL thread_tls_get) (struct HyThreadLibrary * threadLibrary, hythread_t thread,
hythread_tls_key_t key);
+  IDATA (PVMCALL thread_tls_set) (struct HyThreadLibrary * threadLibrary, hythread_t thread,
hythread_tls_key_t key, void *value);
+  /** self_handle*/
+  void *self_handle;
+} HyThreadLibrary;
+
+
+/**
+ * @name Thread library startup and shutdown functions
+ * @anchor ThreadStartup
+ * Create, initialize, startup and shutdow the thread library
+ * @{
+ */
+/** Standard startup and shutdown (thread library allocated on stack or by application) 
*/
+extern HY_CFUNC I_32 VMCALL hythread_create_library (struct HyThreadLibrary
+                                                     *threadLibrary,
+                                                     struct HyThreadLibraryVersion
+                                                     *version, UDATA size);
+extern HY_CFUNC I_32 VMCALL hythread_init_library (struct HyThreadLibrary
+                                                   *threadLibrary,
+                                                   struct HyThreadLibraryVersion
+                                                   *version, UDATA size);
+extern HY_CFUNC I_32 VMCALL hythread_shutdown_library (struct HyThreadLibrary
+                                                       *threadLibrary);
+extern HY_CFUNC I_32 VMCALL hythread_startup_library (struct HyThreadLibrary
+                                                      *threadLibrary);
+/** Thread library self allocation routines */
+extern HY_CFUNC I_32 VMCALL hythread_allocate_library (struct HyThreadLibraryVersion
+                                                       *expectedVersion,
+                                                       struct HyThreadLibrary
+                                                       **threadLibrary);
+
+/** @} */
+/**
+ * @name Thread library version and compatability queries
+ * @anchor ThreadVersionControl
+ * Determine thread library compatability and version.
+ * @{
+ */
+extern HY_CFUNC UDATA VMCALL hythread_getSize (struct HyThreadLibraryVersion
+                                               *version);
+extern HY_CFUNC I_32 VMCALL hythread_getVersion (struct HyThreadLibrary
+                                                 *threadLibrary,
+                                                 struct HyThreadLibraryVersion
+                                                 *version);
+extern HY_CFUNC I_32 VMCALL hythread_isCompatible (struct HyThreadLibraryVersion
+                                                   *expectedVersion);
+
+/** @} */
+/** 
+ * @name ThreadLibrary Access functions
+ * Convenience helpers for accessing thread library functionality.  Users can 
+ * either call functions directly via the table or by help macros.
+ * @code 
+ * if (0 != threadLibrary->thread_monitor_init_with_name (threadLibrary, &nls->monitor,
0, "NLS hash table"))...
+ * @endcode
+ * @code
+ * THREAD_ACCESS_FROM_ENV(jniEnv);
+ * if (0 != hythread_monitor_init_with_name (&nls->monitor, 0, "NLS hash table"))
...
+ * @endcode
+ * @{
+ */
+
+#if !defined(HYTHREAD_LIBRARY_DEFINE)
+#define hythread_global_monitor() (*(hythread_monitor_t*)privateThreadLibrary->thread_global(privateThreadLibrary,"global_monitor"))
+#define hythread_monitor_init(pMon,flags)  privateThreadLibrary->thread_monitor_init_with_name(privateThreadLibrary,pMon,flags,
#pMon)
+
+#define hysem_destroy(param1) privateThreadLibrary->sem_destroy(privateThreadLibrary,param1)
+#define hysem_init(param1,param2) privateThreadLibrary->sem_init(privateThreadLibrary,param1,param2)
+#define hysem_post(param1) privateThreadLibrary->sem_post(privateThreadLibrary,param1)
+#define hysem_wait(param1) privateThreadLibrary->sem_wait(privateThreadLibrary,param1)
+
+#define hythread_attach(param1) privateThreadLibrary->thread_attach(privateThreadLibrary,param1)
+#define hythread_create(param1,param2,param3,param4,param5,param6) privateThreadLibrary->thread_create(privateThreadLibrary,param1,param2,param3,param4,param5,param6)
+#define hythread_detach(param1) privateThreadLibrary->thread_detach(privateThreadLibrary,param1)
+#define hythread_exit(param1) privateThreadLibrary->thread_exit(privateThreadLibrary,param1)
+
+#define hythread_global(param1) privateThreadLibrary->thread_global(privateThreadLibrary,param1)
+
+#define hythread_monitor_destroy(param1) privateThreadLibrary->thread_monitor_destroy(privateThreadLibrary,param1)
+#define hythread_monitor_enter(param1) privateThreadLibrary->thread_monitor_enter(privateThreadLibrary,param1)
+#define hythread_monitor_exit(param1) privateThreadLibrary->thread_monitor_exit(privateThreadLibrary,param1)
+#define hythread_monitor_init_with_name(param1,param2,param3) privateThreadLibrary->thread_monitor_init_with_name(privateThreadLibrary,param1,param2,param3)
+#define hythread_monitor_notify(param1) privateThreadLibrary->thread_monitor_notify(privateThreadLibrary,param1)
+#define hythread_monitor_notify_all(param1) privateThreadLibrary->thread_monitor_notify_all(privateThreadLibrary,param1)
+#define hythread_monitor_wait(param1) privateThreadLibrary->thread_monitor_wait(privateThreadLibrary,param1)
+
+#define hythread_self() privateThreadLibrary->thread_self(privateThreadLibrary)
+#define hythread_sleep(param1) privateThreadLibrary->thread_sleep(privateThreadLibrary,param1)
+
+#define hythread_tls_alloc(param1) privateThreadLibrary->thread_tls_alloc(privateThreadLibrary,param1)
+#define hythread_tls_free(param1) privateThreadLibrary->thread_tls_free(privateThreadLibrary,param1)
+#define hythread_tls_get(param1,param2) privateThreadLibrary->thread_tls_get(privateThreadLibrary,param1,param2)
+#define hythread_tls_set(param1,param2,param3) privateThreadLibrary->thread_tls_set(privateThreadLibrary,param1,param2,param3)
+
+#endif /*  !HYTHREAD_LIBRARY_DEFINE */
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* HYTHREAD_H */

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/shared/hythread.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/DoxygenSupport.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/DoxygenSupport.txt?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/DoxygenSupport.txt
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/DoxygenSupport.txt
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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 Thread Thread
+ * @brief Threading and Synchronization Library API.
+ * 
+ * The threading and synchronization API describes a programmatic interface for the 
+ * generic management and use of basic threading and synchronization functionality 
+ * common to most operating systems. In implementation, it will usually be a thin 
+ * abstraction layer atop already-provided operating system support for these 
+ * features. It is in many ways analagous to a subset of the pthreads library. 
+ * 
+ */
+
+

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/DoxygenSupport.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/exports.txt?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/exports.txt
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/exports.txt
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,8 @@
+hythread_create_library
+hythread_init_library
+hythread_shutdown_library
+hythread_startup_library
+hythread_allocate_library
+hythread_getSize
+hythread_getVersion
+hythread_isCompatible

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/exports.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/makefile?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/makefile
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/unix/makefile
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,29 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You 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'
+#
+
+include $(HY_HDK)/build/make/defines.mk
+
+CFLAGS += -fpic
+
+BUILDFILES = $(SHAREDSUB)hythread.o
+
+DLLNAME = ../libhythr.so
+EXPNAME = HYTHR_0.2
+
+include $(HY_HDK)/build/make/rules.mk

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/DoxygenSupport.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/DoxygenSupport.txt?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/DoxygenSupport.txt
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/DoxygenSupport.txt
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,33 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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 Thread Thread
+ * @brief Threading and Synchronization Library API.
+ * 
+ * The threading and synchronization API describes a programmatic interface for the 
+ * generic management and use of basic threading and synchronization functionality 
+ * common to most operating systems. In implementation, it will usually be a thin 
+ * abstraction layer atop already-provided operating system support for these 
+ * features. It is in many ways analagous to a subset of the pthreads library. 
+ * 
+ */

Propchange: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/DoxygenSupport.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.def
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.def?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.def
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.def
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,15 @@
+LIBRARY	HYTHR
+
+SECTIONS
+	.data	READ WRITE
+	.text	EXECUTE READ
+
+EXPORTS
+	hythread_create_library
+	hythread_init_library
+	hythread_shutdown_library
+	hythread_startup_library
+	hythread_allocate_library
+	hythread_getSize
+	hythread_getVersion
+	hythread_isCompatible 

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.rc
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.rc?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.rc
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/hythr.rc
Wed Mar 28 01:27:23 2007
@@ -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", "Thread native code\0"
+			VALUE "FileVersion", "0.1\0"
+			VALUE "InternalName", "thread\0"
+			VALUE "LegalCopyright", "(c) Copyright 2005 The Apache Software Foundation or its licensors,
as applicable.\0"
+			VALUE "OriginalFilename", "hythr.dll\0"
+			VALUE "ProductName", "Apache Harmony\0"
+			VALUE "ProductVersion", "0.1\0"
+		END
+	END
+	BLOCK "VarFileInfo"
+	BEGIN
+		VALUE "Translation", 0x0409, 1200
+	END
+END

Added: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/makefile
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/makefile?view=auto&rev=523228
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/makefile
(added)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/thrstub/windows/makefile
Wed Mar 28 01:27:23 2007
@@ -0,0 +1,36 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You 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'
+#
+
+!include <$(HY_HDK)\build\make\defines.mak>
+
+LIBBASE=hythr
+DLLNAME=..\$(LIBBASE).dll
+LIBNAME=$(LIBPATH)$(LIBBASE).lib
+
+BUILDFILES = $(SHAREDSUB)hythread.obj
+
+# TOFIX $(LIBBASE).def should be a dependency on all libs
+VIRTFILES = $(LIBBASE).res
+HYCFLAGS = $(HYCFLAGS) /I$(SHAREDSUB)
+HYLDFLAGS = $(HYLDFLAGS) -def:$(LIBBASE).def 
+
+DLLBASE=0x11500000
+COMMENT=/comment:"Thread support library. (c) Copyright 1993, 2005 The Apache Software Foundation
or its licensors, as applicable."
+
+!include <$(HY_HDK)\build\make\rules.mak>



Mime
View raw message