223 |
#elif defined HAVE_INTTYPES_H |
#elif defined HAVE_INTTYPES_H |
224 |
#include <inttypes.h> |
#include <inttypes.h> |
225 |
#endif |
#endif |
226 |
|
#include <stdio.h> /* snprintf */ |
227 |
#include <stdarg.h> /* va_list */ |
#include <stdarg.h> /* va_list */ |
228 |
#include "gthread-jni.h" |
#include "gthread-jni.h" |
229 |
#include <assert.h> /* assert() */ |
#include <assert.h> /* assert() */ |
247 |
Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit */ |
Java_gnu_java_awt_peer_gtk_GtkMainThread_gtkInit */ |
248 |
JavaVM *the_vm; |
JavaVM *the_vm; |
249 |
|
|
250 |
|
/* Unions used for type punning. */ |
251 |
|
union env_union |
252 |
|
{ |
253 |
|
void **void_env; |
254 |
|
JNIEnv **jni_env; |
255 |
|
}; |
256 |
|
|
257 |
|
union func_union |
258 |
|
{ |
259 |
|
void *void_func; |
260 |
|
GThreadFunc g_func; |
261 |
|
}; |
262 |
|
|
263 |
/* Forward Declarations for Functions */ |
/* Forward Declarations for Functions */ |
264 |
static int threadObj_set_priority (JNIEnv * env, jobject threadObj, |
static int threadObj_set_priority (JNIEnv * env, jobject threadObj, |
265 |
GThreadPriority gpriority); |
GThreadPriority gpriority); |
463 |
|
|
464 |
if ((buf = malloc (len))) |
if ((buf = malloc (len))) |
465 |
{ |
{ |
466 |
bzero (buf, len); |
memset (buf, 0, len); |
467 |
snprintf (buf, len, fmt, message, file, line); |
snprintf (buf, len, fmt, message, file, line); |
468 |
jmessage = (*env)->NewStringUTF (env, buf); |
jmessage = (*env)->NewStringUTF (env, buf); |
469 |
free (buf); |
free (buf); |
1450 |
{ |
{ |
1451 |
jobject mutexObj; |
jobject mutexObj; |
1452 |
JNIEnv *env; |
JNIEnv *env; |
1453 |
|
union env_union e; |
1454 |
|
|
1455 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1456 |
tracing ("mutex_new_jni_impl()"); |
tracing ("mutex_new_jni_impl()"); |
1457 |
|
|
1458 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1459 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1460 |
|
|
1461 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1462 |
{ |
{ |
1481 |
struct mutexObj_cache mcache; |
struct mutexObj_cache mcache; |
1482 |
jobject mutexObj = (jobject) mutex; |
jobject mutexObj = (jobject) mutex; |
1483 |
JNIEnv *env; |
JNIEnv *env; |
1484 |
|
union env_union e; |
1485 |
|
|
1486 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1487 |
tracing ("mutex_lock_jni_impl( mutexObj = %p )", mutexObj); |
tracing ("mutex_lock_jni_impl( mutexObj = %p )", mutexObj); |
1488 |
|
|
1489 |
assert (mutexObj); |
assert (mutexObj); |
1490 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1491 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1492 |
|
|
1493 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1494 |
goto done; |
goto done; |
1517 |
jint potentialLockers; |
jint potentialLockers; |
1518 |
gboolean ret = FALSE; |
gboolean ret = FALSE; |
1519 |
JNIEnv *env; |
JNIEnv *env; |
1520 |
|
union env_union e; |
1521 |
struct mutexObj_cache mcache; |
struct mutexObj_cache mcache; |
1522 |
|
|
1523 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1525 |
|
|
1526 |
assert (mutexObj); |
assert (mutexObj); |
1527 |
|
|
1528 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1529 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1530 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1531 |
goto done; |
goto done; |
1532 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
1591 |
jobject mutexObj = (jobject) gmutex; |
jobject mutexObj = (jobject) gmutex; |
1592 |
struct mutexObj_cache mcache; |
struct mutexObj_cache mcache; |
1593 |
JNIEnv *env; |
JNIEnv *env; |
1594 |
|
union env_union e; |
1595 |
|
|
1596 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1597 |
tracing ("mutex_unlock_jni_impl(mutexObj=%p)", mutexObj); |
tracing ("mutex_unlock_jni_impl(mutexObj=%p)", mutexObj); |
1598 |
|
|
1599 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1600 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1601 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1602 |
goto done; |
goto done; |
1603 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
1626 |
{ |
{ |
1627 |
jobject mutexObj = (jobject) mutex; |
jobject mutexObj = (jobject) mutex; |
1628 |
JNIEnv *env; |
JNIEnv *env; |
1629 |
|
union env_union e; |
1630 |
|
|
1631 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1632 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1633 |
|
|
1634 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1635 |
tracing ("mutex_free_jni_impl(%p)", mutexObj); |
tracing ("mutex_free_jni_impl(%p)", mutexObj); |
1653 |
{ |
{ |
1654 |
jobject condObj; |
jobject condObj; |
1655 |
JNIEnv *env; |
JNIEnv *env; |
1656 |
|
union env_union e; |
1657 |
|
|
1658 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1659 |
tracing ("mutex_free_jni_impl()"); |
tracing ("mutex_free_jni_impl()"); |
1660 |
|
|
1661 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1662 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1663 |
|
|
1664 |
condObj = allocatePlainObject (env); |
condObj = allocatePlainObject (env); |
1665 |
|
|
1676 |
cond_signal_jni_impl (GCond * gcond) |
cond_signal_jni_impl (GCond * gcond) |
1677 |
{ |
{ |
1678 |
JNIEnv *env; |
JNIEnv *env; |
1679 |
|
union env_union e; |
1680 |
jobject condObj = (jobject) gcond; |
jobject condObj = (jobject) gcond; |
1681 |
|
|
1682 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1683 |
tracing ("cond_signal_jni_impl(condObj = %p)", condObj); |
tracing ("cond_signal_jni_impl(condObj = %p)", condObj); |
1684 |
|
|
1685 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1686 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1687 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1688 |
goto done; |
goto done; |
1689 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
1719 |
{ |
{ |
1720 |
jobject condObj = (jobject) gcond; |
jobject condObj = (jobject) gcond; |
1721 |
JNIEnv *env; |
JNIEnv *env; |
1722 |
|
union env_union e; |
1723 |
|
|
1724 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1725 |
tracing ("cond_broadcast_jni_impl(condObj=%p)", condObj); |
tracing ("cond_broadcast_jni_impl(condObj=%p)", condObj); |
1726 |
|
|
1727 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1728 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1729 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1730 |
goto done; |
goto done; |
1731 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
1765 |
jobject condObj = (jobject) gcond; |
jobject condObj = (jobject) gcond; |
1766 |
jobject mutexObj = (jobject) gmutex; |
jobject mutexObj = (jobject) gmutex; |
1767 |
JNIEnv *env; |
JNIEnv *env; |
1768 |
|
union env_union e; |
1769 |
|
|
1770 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1771 |
tracing ("cond_wait_jni_impl(condObj=%p, mutexObj=%p)", |
tracing ("cond_wait_jni_impl(condObj=%p, mutexObj=%p)", |
1772 |
condObj, mutexObj); |
condObj, mutexObj); |
1773 |
|
|
1774 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1775 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1776 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1777 |
goto done; |
goto done; |
1778 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
1831 |
cond_timed_wait_jni_impl (GCond * gcond, GMutex * gmutex, GTimeVal * end_time) |
cond_timed_wait_jni_impl (GCond * gcond, GMutex * gmutex, GTimeVal * end_time) |
1832 |
{ |
{ |
1833 |
JNIEnv *env; |
JNIEnv *env; |
1834 |
|
union env_union e; |
1835 |
jlong time_millisec; |
jlong time_millisec; |
1836 |
jint time_nanosec; |
jint time_nanosec; |
1837 |
jthrowable cause; |
jthrowable cause; |
1850 |
} |
} |
1851 |
|
|
1852 |
|
|
1853 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1854 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1855 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1856 |
goto done; |
goto done; |
1857 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
1937 |
{ |
{ |
1938 |
jobject condObj = (jobject) cond; |
jobject condObj = (jobject) cond; |
1939 |
JNIEnv *env; |
JNIEnv *env; |
1940 |
|
union env_union e; |
1941 |
|
|
1942 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1943 |
tracing ("cond_free_jni_impl(condObj = %p)", condObj); |
tracing ("cond_free_jni_impl(condObj = %p)", condObj); |
1944 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1945 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1946 |
|
|
1947 |
freeObject (env, condObj); |
freeObject (env, condObj); |
1948 |
|
|
1965 |
private_new_jni_impl (GDestroyNotify notify __attribute__ ((unused))) |
private_new_jni_impl (GDestroyNotify notify __attribute__ ((unused))) |
1966 |
{ |
{ |
1967 |
JNIEnv *env; |
JNIEnv *env; |
1968 |
|
union env_union e; |
1969 |
jobject lcl_key; |
jobject lcl_key; |
1970 |
jobject global_key; |
jobject global_key; |
1971 |
GPrivate *gkey = NULL; /* Error return code */ |
GPrivate *gkey = NULL; /* Error return code */ |
1973 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
1974 |
tracing ("private_new_jni_impl()"); |
tracing ("private_new_jni_impl()"); |
1975 |
|
|
1976 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
1977 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
1978 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
1979 |
goto done; |
goto done; |
1980 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
2012 |
private_get_jni_impl (GPrivate * gkey) |
private_get_jni_impl (GPrivate * gkey) |
2013 |
{ |
{ |
2014 |
JNIEnv *env; |
JNIEnv *env; |
2015 |
|
union env_union e; |
2016 |
jobject val_wrapper; |
jobject val_wrapper; |
2017 |
jobject keyObj = (jobject) gkey; |
jobject keyObj = (jobject) gkey; |
2018 |
gpointer thread_specific_data = NULL; /* Init to the error-return value */ |
gpointer thread_specific_data = NULL; /* Init to the error-return value */ |
2022 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
2023 |
tracing ("private_get_jni_impl(keyObj=%p)", keyObj); |
tracing ("private_get_jni_impl(keyObj=%p)", keyObj); |
2024 |
|
|
2025 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2026 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2027 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2028 |
goto done; |
goto done; |
2029 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
2069 |
private_set_jni_impl (GPrivate * gkey, gpointer thread_specific_data) |
private_set_jni_impl (GPrivate * gkey, gpointer thread_specific_data) |
2070 |
{ |
{ |
2071 |
JNIEnv *env; |
JNIEnv *env; |
2072 |
|
union env_union e; |
2073 |
jobject val_wrapper; |
jobject val_wrapper; |
2074 |
jobject keyObj = (jobject) gkey; |
jobject keyObj = (jobject) gkey; |
2075 |
|
|
2078 |
tracing ("private_set_jni_impl(keyObj=%p, thread_specific_data=%p)", |
tracing ("private_set_jni_impl(keyObj=%p, thread_specific_data=%p)", |
2079 |
keyObj, thread_specific_data); |
keyObj, thread_specific_data); |
2080 |
|
|
2081 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2082 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2083 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2084 |
goto done; |
goto done; |
2085 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
2154 |
/* Do not touch the GError stuff unless you have |
/* Do not touch the GError stuff unless you have |
2155 |
RECOVERABLE trouble. There is no recoverable |
RECOVERABLE trouble. There is no recoverable |
2156 |
trouble in this implementation. */ |
trouble in this implementation. */ |
2157 |
GError **errorp) |
GError **errorp __attribute__((unused))) |
2158 |
{ |
{ |
2159 |
JNIEnv *env; |
JNIEnv *env; |
2160 |
|
union env_union e; |
2161 |
|
union func_union f; |
2162 |
jboolean jjoinable = joinable; |
jboolean jjoinable = joinable; |
2163 |
jobject newThreadObj; |
jobject newThreadObj; |
2164 |
gpointer threadID; /* to be filled in */ |
gpointer threadID; /* to be filled in */ |
2165 |
|
|
2166 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
2167 |
tracing ("thread_create_jni_impl(func=%p, data=%p, joinable=%s," |
{ |
2168 |
" threadIDp=%p, *(int *) threadIDp = %d)", |
f.g_func = func; |
2169 |
(void *) func, data, joinable ? "TRUE" : "FALSE", |
tracing ("thread_create_jni_impl(func=%p, data=%p, joinable=%s," |
2170 |
threadIDp, *(int *) threadIDp); |
" threadIDp=%p, *(int *) threadIDp = %d)", |
2171 |
|
f.void_func, data, joinable ? "TRUE" : "FALSE", |
2172 |
|
threadIDp, *(int *) threadIDp); |
2173 |
|
} |
2174 |
|
|
2175 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2176 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2177 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2178 |
{ |
{ |
2179 |
/* The failed call to setup the cache is certainly not recoverable; |
/* The failed call to setup the cache is certainly not recoverable; |
2241 |
thread_yield_jni_impl (void) |
thread_yield_jni_impl (void) |
2242 |
{ |
{ |
2243 |
JNIEnv *env; |
JNIEnv *env; |
2244 |
|
union env_union e; |
2245 |
|
|
2246 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
2247 |
tracing ("thread_yield_jni_impl()"); |
tracing ("thread_yield_jni_impl()"); |
2248 |
|
|
2249 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2250 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2251 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2252 |
goto done; |
goto done; |
2253 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
2268 |
thread_join_jni_impl (gpointer threadID) |
thread_join_jni_impl (gpointer threadID) |
2269 |
{ |
{ |
2270 |
JNIEnv *env; |
JNIEnv *env; |
2271 |
|
union env_union e; |
2272 |
jobject threadObj = NULL; |
jobject threadObj = NULL; |
2273 |
|
|
2274 |
if ( TRACE_API_CALLS ) |
if ( TRACE_API_CALLS ) |
2275 |
tracing ("thread_join_jni_impl(threadID=%p) ", threadID); |
tracing ("thread_join_jni_impl(threadID=%p) ", threadID); |
2276 |
|
|
2277 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2278 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2279 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2280 |
goto done; |
goto done; |
2281 |
HIDE_OLD_TROUBLE (env); |
HIDE_OLD_TROUBLE (env); |
2316 |
thread_exit_jni_impl (void) |
thread_exit_jni_impl (void) |
2317 |
{ |
{ |
2318 |
JNIEnv *env; |
JNIEnv *env; |
2319 |
|
union env_union e; |
2320 |
jobject this_thread; |
jobject this_thread; |
2321 |
|
|
2322 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
2323 |
tracing ("thread_exit_jni_impl() "); |
tracing ("thread_exit_jni_impl() "); |
2324 |
|
|
2325 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2326 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2327 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2328 |
goto done; |
goto done; |
2329 |
|
|
2405 |
{ |
{ |
2406 |
jobject threadObj = NULL; |
jobject threadObj = NULL; |
2407 |
JNIEnv *env; |
JNIEnv *env; |
2408 |
|
union env_union e; |
2409 |
|
|
2410 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
2411 |
tracing ("thread_set_priority_jni_impl(gThreadID=%p, gpriority = %u) ", |
tracing ("thread_set_priority_jni_impl(gThreadID=%p, gpriority = %u) ", |
2412 |
gThreadID, gpriority); |
gThreadID, gpriority); |
2413 |
|
|
2414 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2415 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2416 |
|
|
2417 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2418 |
goto done; |
goto done; |
2461 |
gpointer my_thread_IDp) |
gpointer my_thread_IDp) |
2462 |
{ |
{ |
2463 |
JNIEnv *env; |
JNIEnv *env; |
2464 |
|
union env_union e; |
2465 |
jobject this_thread; |
jobject this_thread; |
2466 |
gpointer my_threadID; |
gpointer my_threadID; |
2467 |
|
|
2468 |
if (TRACE_API_CALLS) |
if (TRACE_API_CALLS) |
2469 |
tracing ("thread_self_jni_impl(my_thread_IDp=%p)", my_thread_IDp); |
tracing ("thread_self_jni_impl(my_thread_IDp=%p)", my_thread_IDp); |
2470 |
|
|
2471 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2472 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2473 |
|
|
2474 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2475 |
return; |
return; |
2500 |
thread_equal_jni_impl (gpointer thread1, gpointer thread2) |
thread_equal_jni_impl (gpointer thread1, gpointer thread2) |
2501 |
{ |
{ |
2502 |
JNIEnv *env; |
JNIEnv *env; |
2503 |
|
union env_union e; |
2504 |
|
|
2505 |
gpointer threadID1 = *(gpointer *) thread1; |
gpointer threadID1 = *(gpointer *) thread1; |
2506 |
gpointer threadID2 = *(gpointer *) thread2; |
gpointer threadID2 = *(gpointer *) thread2; |
2513 |
tracing ("thread_equal_jni_impl(threadID1=%p, threadID2=%p)", |
tracing ("thread_equal_jni_impl(threadID1=%p, threadID2=%p)", |
2514 |
threadID1, threadID2); |
threadID1, threadID2); |
2515 |
|
|
2516 |
(*the_vm)->GetEnv (the_vm, (void **) &env, JNI_VERSION_1_1); |
e.jni_env = &env; |
2517 |
|
(*the_vm)->GetEnv (the_vm, e.void_env, JNI_VERSION_1_1); |
2518 |
if (setup_cache (env) < 0) |
if (setup_cache (env) < 0) |
2519 |
{ |
{ |
2520 |
ret = FALSE; /* what is safer? We really don't ever want |
ret = FALSE; /* what is safer? We really don't ever want |