]> git.ipfire.org Git - thirdparty/gcc.git/blame - libcilkrts/include/cilk/cilk_undocumented.h
[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd
[thirdparty/gcc.git] / libcilkrts / include / cilk / cilk_undocumented.h
CommitLineData
3038054c 1/*
2e01cda6 2 * Copyright (C) 2009-2016, Intel Corporation
3038054c
BI
3 * All rights reserved.
4 *
3038054c
BI
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.
18 *
3038054c
BI
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.
2e01cda6
IV
31 *
32 * *********************************************************************
33 *
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.
42 *
43 * We welcome your contributions to this open source project. Thank you
44 * for your assistance in helping us improve Cilk Plus.
3038054c
BI
45 *
46 ******************************************************************************
47 *
48 * cilk_undocumented.h
49 *
50 * This file defines exported functions that are not included in the standard
51 * documentation.
52 */
53
54#ifndef INCLUDED_CILK_UNDOCUMENTED_H
55#define INCLUDED_CILK_UNDOCUMENTED_H
56
57#include <cilk/common.h>
58
59#ifndef CILK_STUB
60
61__CILKRTS_BEGIN_EXTERN_C
62
63/*
64 * __cilkrts_synched
65 *
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.
71 */
72
73CILK_EXPORT __CILKRTS_NOTHROW
74int __cilkrts_synched(void);
75
76/*
77 * __cilkrts_cilkscreen_puts
78 *
79 * Allows an application to write a string to the Cilkscreen log.
80 * The standard error stream will be flushed after the write.
81 */
82
83CILK_EXPORT __CILKRTS_NOTHROW
84void __cilkrts_cilkscreen_puts(const char *);
85
86/*
87 * __cilkrts_get_sf
88 *
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.
91 */
92
93CILK_EXPORT __CILKRTS_NOTHROW
94void *__cilkrts_get_sf(void);
95
96/**
2e01cda6 97 * Returns the size of stacks created by Intel(R) Cilk(TM) Plus.
3038054c
BI
98 */
99CILK_EXPORT __CILKRTS_NOTHROW
100size_t __cilkrts_get_stack_size(void);
101
102/**
103 * Dumps runtime statistics to stderr.
104 * Undocumented API for debugging.
105 */
106CILK_EXPORT __CILKRTS_NOTHROW
107void __cilkrts_dump_stats(void);
108
3038054c
BI
109struct __cilk_tbb_unwatch_thunk;
110struct __cilk_tbb_stack_op_thunk;
111
112CILK_EXPORT __CILKRTS_NOTHROW
113int __cilkrts_watch_stack(struct __cilk_tbb_unwatch_thunk *u,
114 struct __cilk_tbb_stack_op_thunk o);
115
116#ifndef IN_CILK_RUNTIME
117#ifdef _WIN32
118/* Do not use CILK_API because __cilkrts_worker_stub must be __stdcall */
119CILK_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 */
123CILK_EXPORT void* __CILKRTS_NOTHROW
124__cilkrts_worker_stub(void *arg);
125#endif /* _WIN32 */
126#endif /* IN_CILK_RUNTIME */
127
128__CILKRTS_END_EXTERN_C
129
130#else /* CILK_STUB */
131
132/* Stubs for the api functions */
133
134#define __cilkrts_get_stack_size() (0)
135#define __cilkrts_synched() (1)
136
137#endif /* CILK_STUB */
138
139#endif /* INCLUDED_CILK_UNDOCUMENTED_H */