Small ChangeLog tweak.
[official-gcc.git] / libcilkrts / include / cilk / cilk_undocumented.h
blob71a51ec52d6b4a89b19382eec7fa7248db91360e
1 /*
2 * Copyright (C) 2009-2016, Intel Corporation
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in
13 * the documentation and/or other materials provided with the
14 * distribution.
15 * * Neither the name of Intel Corporation nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
26 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
27 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
29 * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
32 * *********************************************************************
34 * PLEASE NOTE: This file is a downstream copy of a file mainitained in
35 * a repository at cilkplus.org. Changes made to this file that are not
36 * submitted through the contribution process detailed at
37 * http://www.cilkplus.org/submit-cilk-contribution will be lost the next
38 * time that a new version is released. Changes only submitted to the
39 * GNU compiler collection or posted to the git repository at
40 * https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
41 * not tracked.
43 * We welcome your contributions to this open source project. Thank you
44 * for your assistance in helping us improve Cilk Plus.
46 ******************************************************************************
48 * cilk_undocumented.h
50 * This file defines exported functions that are not included in the standard
51 * documentation.
54 #ifndef INCLUDED_CILK_UNDOCUMENTED_H
55 #define INCLUDED_CILK_UNDOCUMENTED_H
57 #include <cilk/common.h>
59 #ifndef CILK_STUB
61 __CILKRTS_BEGIN_EXTERN_C
64 * __cilkrts_synched
66 * Allows an application to determine if there are any outstanding children at
67 * this instant. This function will examine the current full frame to
68 * determine this. This function will return a valid result only when called
69 * within a spawn continuation, within the stack frame of the continuation
70 * itself.
73 CILK_EXPORT __CILKRTS_NOTHROW
74 int __cilkrts_synched(void);
77 * __cilkrts_cilkscreen_puts
79 * Allows an application to write a string to the Cilkscreen log.
80 * The standard error stream will be flushed after the write.
83 CILK_EXPORT __CILKRTS_NOTHROW
84 void __cilkrts_cilkscreen_puts(const char *);
87 * __cilkrts_get_sf
89 * A debugging aid that allows an application to get the __cilkrts_stack_frame
90 * for the current function. Only compiled into the DLL in debug builds.
93 CILK_EXPORT __CILKRTS_NOTHROW
94 void *__cilkrts_get_sf(void);
96 /**
97 * Returns the size of stacks created by Intel(R) Cilk(TM) Plus.
99 CILK_EXPORT __CILKRTS_NOTHROW
100 size_t __cilkrts_get_stack_size(void);
102 /**
103 * Dumps runtime statistics to stderr.
104 * Undocumented API for debugging.
106 CILK_EXPORT __CILKRTS_NOTHROW
107 void __cilkrts_dump_stats(void);
109 struct __cilk_tbb_unwatch_thunk;
110 struct __cilk_tbb_stack_op_thunk;
112 CILK_EXPORT __CILKRTS_NOTHROW
113 int __cilkrts_watch_stack(struct __cilk_tbb_unwatch_thunk *u,
114 struct __cilk_tbb_stack_op_thunk o);
116 #ifndef IN_CILK_RUNTIME
117 #ifdef _WIN32
118 /* Do not use CILK_API because __cilkrts_worker_stub must be __stdcall */
119 CILK_EXPORT unsigned __CILKRTS_NOTHROW __stdcall
120 __cilkrts_worker_stub(void *arg);
121 #else
122 /* Do not use CILK_API because __cilkrts_worker_stub have default visibility */
123 CILK_EXPORT void* __CILKRTS_NOTHROW
124 __cilkrts_worker_stub(void *arg);
125 #endif /* _WIN32 */
126 #endif /* IN_CILK_RUNTIME */
128 __CILKRTS_END_EXTERN_C
130 #else /* CILK_STUB */
132 /* Stubs for the api functions */
134 #define __cilkrts_get_stack_size() (0)
135 #define __cilkrts_synched() (1)
137 #endif /* CILK_STUB */
139 #endif /* INCLUDED_CILK_UNDOCUMENTED_H */