source: trunk/third/gcc/libjava/no-threads.cc @ 18474

Revision 18474, 878 bytes checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18473, which included commits to RCS files with non-trunk default branches.
Line 
1// no-thread.cc - Implementation of `no threads' threads.
2
3/* Copyright (C) 1998, 1999, 2001  Free Software Foundation
4
5   This file is part of libgcj.
6
7This software is copyrighted work licensed under the terms of the
8Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
9details.  */
10
11#include <config.h>
12
13#include <gcj/cni.h>
14#include <jvm.h>
15#include <java/lang/Thread.h>
16#include <java/lang/InternalError.h>
17
18java::lang::Thread *_Jv_OnlyThread = NULL;
19
20_Jv_Thread_t *
21_Jv_ThreadInitData (java::lang::Thread *thread)
22{
23  // It is ok to create a new Thread object, as long as it isn't started.
24  if (_Jv_OnlyThread == NULL)
25    _Jv_OnlyThread = thread;
26  return NULL;
27}
28
29void
30_Jv_ThreadStart (java::lang::Thread *, _Jv_Thread_t *, _Jv_ThreadStartFunc *)
31{
32  throw new java::lang::InternalError (JvNewStringLatin1 ("Thread.start called but threads not available"));
33}
Note: See TracBrowser for help on using the repository browser.