[multiple changes]
2000-03-15 Tom Tromey <tromey@cygnus.com> * java/io/natFileDescriptorWin32.cc (winerr): Now static. * prims.cc (win32_exception_handler): Reformatted. * include/win32-threads.h (_Jv_HaveCondDestroy): New define. (_Jv_HaveMutexDestroy): Likewise. 2000-03-15 Jon Beniston <jb7216@bristol.ac.uk> * java/io/natFileDescriptorWin32.cc: New file. * java/io/natFileWin32.cc: New file. * java/net/natInetAddress.cc: Added conditional inclusion of Windows / Winsock headers. * java/net/natPlainDatagramSocketImpl.cc: Added conditional inclusion of Windows / Winsock headers. * java/net/natPlainSocketImpl.cc: Added conditional inclusion of Windows / Winsock headers. * include/win32-signal.h: New file. * include/win32-threads.h: New file. * win32-threads.cc: New file. * exception.cc (win32_get_restart_frame): New function. * prims.cc (win32_exception_handler): New function. (main_init) Performs Winsock initialisation. (main_init) Installs exeception handler. From-SVN: r32567
This commit is contained in:
parent
1a7b4c697c
commit
878885b411
11 changed files with 1031 additions and 2 deletions
|
@ -37,7 +37,7 @@ extern "C" void __throw () __attribute__ ((__noreturn__));
|
|||
extern "C" void __sjthrow () __attribute__ ((__noreturn__));
|
||||
extern "C" short __get_eh_table_version (void *table);
|
||||
extern "C" short __get_eh_table_language (void *table);
|
||||
|
||||
extern "C" void *__get_eh_context ();
|
||||
|
||||
extern "C" void *
|
||||
_Jv_type_matcher (java_eh_info *info, void* match_info,
|
||||
|
@ -161,3 +161,36 @@ _Jv_Throw (void *value)
|
|||
__throw ();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef USE_WIN32_SIGNALLING
|
||||
|
||||
// This is a mangled version of _Jv_Throw and __sjthrow except
|
||||
// rather than calling longjmp, it returns a pointer to the jmp buffer
|
||||
|
||||
extern "C" int *
|
||||
win32_get_restart_frame (void *value)
|
||||
{
|
||||
struct eh_context *eh = (struct eh_context *)__get_eh_context ();
|
||||
void ***dhc = &eh->dynamic_handler_chain;
|
||||
|
||||
java_eh_info *ehinfo = *(__get_eh_info ());
|
||||
if (ehinfo == NULL)
|
||||
{
|
||||
_Jv_eh_alloc ();
|
||||
ehinfo = *(__get_eh_info ());
|
||||
}
|
||||
ehinfo->eh_info.match_function = (__eh_matcher) _Jv_type_matcher;
|
||||
ehinfo->eh_info.language = EH_LANG_Java;
|
||||
ehinfo->eh_info.version = 1;
|
||||
ehinfo->value = value;
|
||||
|
||||
// FIXME: Run clean ups?
|
||||
|
||||
int *jmpbuf = (int*)&(*dhc)[2];
|
||||
|
||||
*dhc = (void**)(*dhc)[0];
|
||||
|
||||
return jmpbuf;
|
||||
}
|
||||
|
||||
#endif /* USE_WIN32_SIGNALLING */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue