1 // quick-threads.cc - interface between libjava and QuickThreads.
3 /* Copyright (C) 1998, 1999 Cygnus Solutions
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
16 #include <java/lang/Thread.h>
17 #include <java/lang/System.h>
20 // Identifier for our piece of thread-local data. Visible so that it
21 // can be used in quick-threads.h.
25 _Jv_ThreadStart (java::lang::Thread *thread, _Jv_Thread_t *data,
26 _Jv_ThreadStartFunc *meth)
28 *data = coop_create ((coop_userf_t *) meth, (void *) thread,
30 coop_setspecific (*data, _Jv_ThreadKey, thread);
36 _Jv_Throw ((java::lang::Throwable *) except);
39 // Function to destroy thread-specific data item. We just don't care.
46 _Jv_InitThreads (void)
49 _Jv_ThreadKey = coop_key_create (destroy_data);
50 coop_set_throw_function (qthrow);