Debian Codegraph @

external/bdwgc/include/javaxfc.h

raw
1 /*
2 * Copyright (c) 1994 by Xerox Corporation. All rights reserved.
3 * Copyright (c) 1996 by Silicon Graphics. All rights reserved.
4 * Copyright (c) 1998 by Fergus Henderson. All rights reserved.
5 * Copyright (c) 2000-2009 by Hewlett-Packard Development Company.
6 * All rights reserved.
7 *
8 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
9 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
10 *
11 * Permission is hereby granted to use or copy this program
12 * for any purpose, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
16 */
17
18 #ifndef GC_H
19 # include "gc.h"
20 #endif
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /*
27 * Invoke all remaining finalizers that haven't yet been run. (Since the
28 * notifier is not called, this should be called from a separate thread.)
29 * This function is needed for strict compliance with the Java standard,
30 * which can make the runtime guarantee that all finalizers are run.
31 * This is problematic for several reasons:
32 * 1) It means that finalizers, and all methods called by them,
33 * must be prepared to deal with objects that have been finalized in
34 * spite of the fact that they are still referenced by statically
35 * allocated pointer variables.
36 * 2) It may mean that we get stuck in an infinite loop running
37 * finalizers which create new finalizable objects, though that's
38 * probably unlikely.
39 * Thus this is not recommended for general use.
40 */
41 GC_API void GC_CALL GC_finalize_all(void);
42
43 #ifdef GC_THREADS
44 /* External thread suspension support. No thread suspension count */
45 /* (so a thread which has been suspended numerous times will be */
46 /* resumed with the very first call to GC_resume_thread). */
47 /* Acquire the allocation lock. Thread should be registered in GC */
48 /* (otherwise no-op, GC_is_thread_suspended returns false). */
49 /* Unimplemented on some platforms. Not recommended for general use. */
50 # ifndef GC_SUSPEND_THREAD_ID
51 # define GC_SUSPEND_THREAD_ID void*
52 # endif
53 GC_API void GC_CALL GC_suspend_thread(GC_SUSPEND_THREAD_ID);
54 GC_API void GC_CALL GC_resume_thread(GC_SUSPEND_THREAD_ID);
55 GC_API int GC_CALL GC_is_thread_suspended(GC_SUSPEND_THREAD_ID);
56 #endif /* GC_THREADS */
57
58 #ifdef __cplusplus
59 } /* extern "C" */
60 #endif