Index: build/make/components/vm/em.xml =================================================================== --- build/make/components/vm/em.xml (revision 425972) +++ build/make/components/vm/em.xml (working copy) @@ -75,6 +75,10 @@ + Index: build/make/components/vm/vmcore.xml =================================================================== --- build/make/components/vm/vmcore.xml (revision 425972) +++ build/make/components/vm/vmcore.xml (working copy) @@ -260,13 +260,14 @@ Index: build/make/components/extra/apr.xml =================================================================== --- build/make/components/extra/apr.xml (revision 425972) +++ build/make/components/extra/apr.xml (working copy) @@ -88,7 +88,10 @@ - + + Index: build/make/components/extra/eclipse_script.xml =================================================================== --- build/make/components/extra/eclipse_script.xml (revision 425972) +++ build/make/components/extra/eclipse_script.xml (working copy) @@ -51,7 +51,7 @@ - + Index: build/make/targets/common_vm.xml =================================================================== --- build/make/targets/common_vm.xml (revision 425972) +++ build/make/targets/common_vm.xml (working copy) @@ -202,13 +202,14 @@ - - + Index: build/make/deploy.xml =================================================================== --- build/make/deploy.xml (revision 425972) +++ build/make/deploy.xml (working copy) @@ -55,7 +55,7 @@ bin:gc - bin:vmi Index: vm/vmcore/include/exceptions.h =================================================================== --- vm/vmcore/include/exceptions.h (revision 425972) +++ vm/vmcore/include/exceptions.h (working copy) @@ -265,10 +265,12 @@ ManagedObject* get_current_thread_exception(); VMEXPORT // temporary solution for interpreter unplug void __stdcall set_current_thread_exception(ManagedObject* obj); - +#ifndef _EM64T_ void set_guard_stack(); +#endif void init_stack_info(); VMEXPORT size_t get_available_stack_size(); +#ifndef _EM64T_ VMEXPORT bool check_available_stack_size(size_t required_size); - +#endif #endif // _EXCEPTIONS_H_ Index: vm/vmcore/src/jit/compile.cpp =================================================================== --- vm/vmcore/src/jit/compile.cpp (revision 425972) +++ vm/vmcore/src/jit/compile.cpp (working copy) @@ -742,10 +742,12 @@ return JIT_SUCCESS; } else if (method->get_state()==Method::ST_NotCompiled && exn_raised()) { return JIT_FAILURE; - } else if(!check_available_stack_size(256*1024)) { + } +#ifndef _EM64T_ + else if(!check_available_stack_size(256*1024)) { return JIT_FAILURE; } - +#endif JIT_Result res = JIT_FAILURE; if (method->is_native()) { method->lock(); Index: vm/vmcore/src/exception/exceptions.cpp =================================================================== --- vm/vmcore/src/exception/exceptions.cpp (revision 425972) +++ vm/vmcore/src/exception/exceptions.cpp (working copy) @@ -512,7 +512,9 @@ p_TLS_vmthread->p_exception_object = NULL; if (p_TLS_vmthread->restore_guard_page) { +#ifndef _EM64T_ set_guard_stack(); +#endif } } //clear_current_thread_exception @@ -1088,9 +1090,11 @@ // exception catch callback to restore stack after Stack Overflow Error void exception_catch_callback() { +#ifndef _EM64T_ if (p_TLS_vmthread->restore_guard_page) { set_guard_stack(); } +#endif } ////////////////////////////////////////////////////////////////////////// Index: vm/vmcore/src/thread/thread_generic.cpp =================================================================== --- vm/vmcore/src/thread/thread_generic.cpp (revision 425972) +++ vm/vmcore/src/thread/thread_generic.cpp (working copy) @@ -367,7 +367,9 @@ #ifdef _IA32_ init_stack_info(); #ifdef PLATFORM_POSIX +#ifndef _EM64T_ set_guard_stack(); +#endif #endif // PLATFORM_POSIX #endif // _IA32_ Index: vm/vmcore/src/thread/hythr/hythreads.h =================================================================== --- vm/vmcore/src/thread/hythr/hythreads.h (revision 425972) +++ vm/vmcore/src/thread/hythr/hythreads.h (working copy) @@ -28,6 +28,16 @@ #include #define GLOBAL_MONITOR_NAME "global_monitor" +#if defined(LINUX64) +#define DATA_TYPES_DEFINED +typedef signed long int IDATA; +typedef unsigned long int UDATA; /* 64bits */ +#endif +#if !defined(DATA_TYPES_DEFINED) +typedef unsigned int UDATA; +typedef int IDATA; +#endif + extern "C" { @@ -69,8 +79,8 @@ // ==================== create thread ==================== typedef int(__cdecl* hythread_entrypoint_t)(void*); -JNIEXPORT int __cdecl -hythread_create(hythread_t* handle, unsigned stacksize, unsigned priority, unsigned suspend, hythread_entrypoint_t entrypoint, void* entryarg); +JNIEXPORT IDATA __cdecl +hythread_create(hythread_t* handle, UDATA stacksize, UDATA priority, UDATA suspend, hythread_entrypoint_t entrypoint, void* entryarg); // ================== TLS ======================================= typedef apr_threadkey_t* hythread_tls_key_t; Index: vm/vmcore/src/thread/hythr/hythreads.cpp =================================================================== --- vm/vmcore/src/thread/hythr/hythreads.cpp (revision 425972) +++ vm/vmcore/src/thread/hythr/hythreads.cpp (working copy) @@ -240,11 +240,12 @@ static void* APR_THREAD_FUNC hystart_wrapper(apr_thread_t* t , void* args) { hythread_entrypoint_t entrypoint = (hythread_entrypoint_t)*((void **)args); void* hyargs = *((void**)args+1); - return (void*) entrypoint(hyargs); + intptr_t ptr = (intptr_t)entrypoint(hyargs); + return (void*) ptr; } -JNIEXPORT int __cdecl -hythread_create(hythread_t* handle, unsigned stacksize, unsigned priority, unsigned suspend, hythread_entrypoint_t entrypoint, void* entryarg) { +JNIEXPORT IDATA __cdecl +hythread_create(hythread_t* handle, UDATA stacksize, UDATA priority, UDATA suspend, hythread_entrypoint_t entrypoint, void* entryarg) { apr_thread_t *new_thread; apr_pool_t *pool = get_pool(); static void **port_args = (void**)apr_palloc(pool, sizeof(void*)*2);