Daily bump.
[official-gcc.git] / libjava / java / security / natVMAccessControlState.cc
bloba4c14cdd44149fce8648f3325a2af728d7cae9af
1 // natVMAccessControlState.cc -- Native part of the VMAccessControlState class.
3 /* Copyright (C) 2006 Free Software Foundation, Inc.
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
9 details. */
11 #include <config.h>
13 #include <gcj/cni.h>
14 #include <jvm.h>
16 #include <java/lang/Thread.h>
17 #include <java/security/VMAccessControlState.h>
19 java::security::VMAccessControlState *
20 java::security::VMAccessControlState::getThreadState ()
22 java::lang::Thread *thread = java::lang::Thread::currentThread ();
23 if (thread == NULL)
24 return NULL;
26 VMAccessControlState *state =
27 reinterpret_cast<VMAccessControlState *> (thread->accessControlState);
28 if (state == NULL)
29 thread->accessControlState = state = new VMAccessControlState ();
31 return state;