Re: Usage of _Jv_AttachCurrentThread, _Jv_AttachCurrentThreadAsDaemon, _Jv_DetachCurrentThread.

Bryce McKinlay <[email protected]> Wed, 10 Apr 2013 10:34:31 +0100
Newsgroups gmane.comp.gcc.java.devel
Message-ID <CALUNu-r6UBTZhwkOb4uqfrKg5uSnzccMLWAQQbW5xc4Fvwjccw@mail.gmail.com>
On Tue, Apr 9, 2013 at 7:20 PM, Dave Korn <[email protected]> wrote:

>   I could fix this by either adding a !defined(GC_WIN32_THREADS) in the same
> way as Solaris disables these functions, or I could add an implementation of
> the functions in boehm-gc for Cygwin, which is posixy and pthread-based.

As Andrew said, these are used by the JNI (& CNI) "invocation API",
which allows calling into Java code from a non-Java app.

It might be worth checking if newer versions of the GC already have
improvements here for Cygwin. libgcj's copy of boehm-gc is very old
and we really ought to update it!

>   Also on the same topic, would there be any value added by providing Cygwin
> implementations of GC_suspend_thread, GC_resume_thread and
> GC_is_thread_suspended, which are called from _Jv_SuspendThread,
> _JV_ResumeThread, _JV_IsThreadSuspended in boehm.cc and currently #if'd out by
> a test on GC_WIN32_THREADS?

Well, I don't think anything in libgcj really uses these. They might
be useful as part of a debugging interface.

Bryce