blob: 63051a25d53c397e9222bd8caf07e47d1c4c14d7 [file] [log] [blame]
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * VM initialization and shutdown.
19 */
20#ifndef _DALVIK_INIT
21#define _DALVIK_INIT
22
23/*
24 * Standard VM initialization, usually invoked through JNI.
25 */
26int dvmStartup(int argc, const char* const argv[], bool ignoreUnrecognized,
27 JNIEnv* pEnv);
28void dvmShutdown(void);
29bool dvmInitAfterZygote(void);
30
31/*
32 * Enable Java programming language assert statements after the Zygote fork.
33 */
34void dvmLateEnableAssertions(void);
35
36/*
37 * Partial VM initialization; only used as part of "dexopt", which may be
38 * asked to optimize a DEX file holding fundamental classes.
39 */
40int dvmPrepForDexOpt(const char* bootClassPath, DexOptimizerMode dexOptMode,
41 DexClassVerifyMode verifyMode, int dexoptFlags);
42
43/*
The Android Open Source Project99409882009-03-18 22:20:24 -070044 * Replacement for fprintf() when we want to send a message to the console.
45 * This defaults to fprintf(), but will use the JNI fprintf callback if
46 * one was provided.
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080047 */
The Android Open Source Project99409882009-03-18 22:20:24 -070048int dvmFprintf(FILE* fp, const char* format, ...)
49#if defined(__GNUC__)
50 __attribute__ ((format(printf, 2, 3)))
51#endif
52 ;
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080053
54#endif /*_DALVIK_INIT*/