mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-23 01:39:26 +08:00
27e934d8ba
* configure: Rebuilt. * configure.in: Build include/Makefile. * Makefile.in: Rebuilt. * Makefile.am (SUBDIRS): Added gcj and include. (install-data-local): New target. (extra_headers): New macro. * include/Makefile.in: New file. * include/Makefile.am: New file. * interpret.cc: Don't include gcj/field.h or gcj/cni.h. * java/lang/reflect/natField.cc: Don't include gcj/field.h or gcj/cni.h. * boehm.cc: Don't include java-threads.h or gcj/field.h. * resolve.cc: Include config.h. * defineclass.cc: Include config.h. * include/java-interp.h: Don't include config.h. * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, cni.h. * gcj/javaprims.h: Regenerated namespace decls. * classes.pl (scan): Don't put `;' after closing brace. * Makefile.in: Rebuilt. * Makefile.am (INCLUDES): Added -I for top_srcdir. * configure.in: Create gcj/Makefile. * gcj/Makefile.in: New file. * gcj/Makefile.am: New file. * java/lang/Object.h: Don't include any other headers. * gcj/array.h: Renamed from include/java-array.h. * gcj/field.h: Renamed from include/java-field.h. * gcj/method.h: Renamed from include/java-method.h. * gcj/cni.h, gcj/javaprims.h: Moved from include/. Updated all files to reflect new include structure. From-SVN: r29278
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
// quick-threads.cc - interface between libjava and QuickThreads.
|
|
|
|
/* Copyright (C) 1998, 1999 Cygnus Solutions
|
|
|
|
This file is part of libgcj.
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
details. */
|
|
|
|
#include <config.h>
|
|
|
|
#include <gcj/cni.h>
|
|
#include <jvm.h>
|
|
|
|
#include <java/lang/Thread.h>
|
|
#include <java/lang/System.h>
|
|
|
|
|
|
// Identifier for our piece of thread-local data. Visible so that it
|
|
// can be used in quick-threads.h.
|
|
int _Jv_ThreadKey;
|
|
|
|
void
|
|
_Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data,
|
|
_Jv_ThreadStartFunc *meth)
|
|
{
|
|
*data = coop_create ((coop_userf_t *) meth, (void *) thread,
|
|
thread->isDaemon());
|
|
coop_setspecific (*data, _Jv_ThreadKey, thread);
|
|
}
|
|
|
|
static void
|
|
qthrow (void *except)
|
|
{
|
|
_Jv_Throw ((java::lang::Throwable *) except);
|
|
}
|
|
|
|
// Function to destroy thread-specific data item. We just don't care.
|
|
static void
|
|
destroy_data (void *)
|
|
{
|
|
}
|
|
|
|
void
|
|
_Jv_InitThreads (void)
|
|
{
|
|
coop_init ();
|
|
_Jv_ThreadKey = coop_key_create (destroy_data);
|
|
coop_set_throw_function (qthrow);
|
|
}
|