Commit 2e01cda6 by Ilya Verbin Committed by Ilya Verbin

backport: Makefile.am: Merge from upstream...

Merge libcilkrts from upstream.

libcilkrts/
	* Makefile.am: Merge from upstream, version 2.0.4420.0
	<https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git>.
	* README: Likewise.
	* configure.ac: Likewise.
	* configure.tgt: Likewise.
	* include/cilk/cilk.h: Likewise.
	* include/cilk/cilk_api.h: Likewise.
	* include/cilk/cilk_api_linux.h: Likewise.
	* include/cilk/cilk_stub.h: Likewise.
	* include/cilk/cilk_undocumented.h: Likewise.
	* include/cilk/common.h: Likewise.
	* include/cilk/holder.h: Likewise.
	* include/cilk/hyperobject_base.h: Likewise.
	* include/cilk/metaprogramming.h: Likewise.
	* include/cilk/reducer.h: Likewise.
	* include/cilk/reducer_file.h: Likewise.
	* include/cilk/reducer_list.h: Likewise.
	* include/cilk/reducer_max.h: Likewise.
	* include/cilk/reducer_min.h: Likewise.
	* include/cilk/reducer_min_max.h: Likewise.
	* include/cilk/reducer_opadd.h: Likewise.
	* include/cilk/reducer_opand.h: Likewise.
	* include/cilk/reducer_opmul.h: Likewise.
	* include/cilk/reducer_opor.h: Likewise.
	* include/cilk/reducer_opxor.h: Likewise.
	* include/cilk/reducer_ostream.h: Likewise.
	* include/cilk/reducer_string.h: Likewise.
	* include/cilktools/cilkscreen.h: Likewise.
	* include/cilktools/cilkview.h: Likewise.
	* include/cilktools/fake_mutex.h: Likewise.
	* include/cilktools/lock_guard.h: Likewise.
	* include/internal/abi.h: Likewise.
	* include/internal/cilk_fake.h: Likewise.
	* include/internal/cilk_version.h: Likewise.
	* include/internal/metacall.h: Likewise.
	* include/internal/rev.mk: Likewise.
	* mk/cilk-version.mk: Likewise.
	* runtime/acknowledgements.dox: Likewise.
	* runtime/bug.cpp: Likewise.
	* runtime/bug.h: Likewise.
	* runtime/c_reducers.c: Likewise.
	* runtime/cilk-abi-cilk-for.cpp: Likewise.
	* runtime/cilk-abi-vla-internal.c: Likewise.
	* runtime/cilk-abi-vla-internal.h: Likewise.
	* runtime/cilk-abi.c: Likewise.
	* runtime/cilk-ittnotify.h: Likewise.
	* runtime/cilk-tbb-interop.h: Likewise.
	* runtime/cilk_api.c: Likewise.
	* runtime/cilk_fiber-unix.cpp: Likewise.
	* runtime/cilk_fiber-unix.h: Likewise.
	* runtime/cilk_fiber.cpp: Likewise.
	* runtime/cilk_fiber.h: Likewise.
	* runtime/cilk_malloc.c: Likewise.
	* runtime/cilk_malloc.h: Likewise.
	* runtime/component.h: Likewise.
	* runtime/config/generic/cilk-abi-vla.c: Likewise.
	* runtime/config/generic/os-fence.h: Likewise.
	* runtime/config/generic/os-unix-sysdep.c: Likewise.
	* runtime/config/x86/cilk-abi-vla.c: Likewise.
	* runtime/config/x86/os-fence.h: Likewise.
	* runtime/config/x86/os-unix-sysdep.c: Likewise.
	* runtime/doxygen-layout.xml: Likewise.
	* runtime/doxygen.cfg: Likewise.
	* runtime/except-gcc.cpp: Likewise.
	* runtime/except-gcc.h: Likewise.
	* runtime/except.h: Likewise.
	* runtime/frame_malloc.c: Likewise.
	* runtime/frame_malloc.h: Likewise.
	* runtime/full_frame.c: Likewise.
	* runtime/full_frame.h: Likewise.
	* runtime/global_state.cpp: Likewise.
	* runtime/global_state.h: Likewise.
	* runtime/jmpbuf.c: Likewise.
	* runtime/jmpbuf.h: Likewise.
	* runtime/linux-symbols.ver: Likewise.
	* runtime/local_state.c: Likewise.
	* runtime/local_state.h: Likewise.
	* runtime/mac-symbols.txt: Likewise.
	* runtime/metacall_impl.c: Likewise.
	* runtime/metacall_impl.h: Likewise.
	* runtime/os-unix.c: Likewise.
	* runtime/os.h: Likewise.
	* runtime/os_mutex-unix.c: Likewise.
	* runtime/os_mutex.h: Likewise.
	* runtime/pedigrees.c: Likewise.
	* runtime/pedigrees.h: Likewise.
	* runtime/record-replay.cpp: Likewise.
	* runtime/record-replay.h: Likewise.
	* runtime/reducer_impl.cpp: Likewise.
	* runtime/reducer_impl.h: Likewise.
	* runtime/rts-common.h: Likewise.
	* runtime/scheduler.c: Likewise.
	* runtime/scheduler.h: Likewise.
	* runtime/signal_node.c: Likewise.
	* runtime/signal_node.h: Likewise.
	* runtime/spin_mutex.c: Likewise.
	* runtime/spin_mutex.h: Likewise.
	* runtime/stats.c: Likewise.
	* runtime/stats.h: Likewise.
	* runtime/sysdep-unix.c: Likewise.
	* runtime/sysdep.h: Likewise.
	* runtime/worker_mutex.c: Likewise.
	* runtime/worker_mutex.h: Likewise.
	* include/cilk/reducer_vector.h: New.
	* runtime/cilk_str_mem.h: New.
	* runtime/config/arm/cilk-abi-vla.c: New.
	* runtime/config/arm/os-fence.h: New.
	* runtime/config/arm/os-unix-sysdep.c: New.
	* runtime/declare-alloca.h: New.
	* runtime/sslib/ignore_handler_s.c: New.
	* runtime/sslib/safe_lib.h: New.
	* runtime/sslib/safe_lib_errno.h: New.
	* runtime/sslib/safe_str_constraint.c: New.
	* runtime/sslib/safe_str_constraint.h: New.
	* runtime/sslib/safe_str_lib.h: New.
	* runtime/sslib/safe_types.h: New.
	* runtime/sslib/safeclib_private.h: New.
	* runtime/sslib/snprintf_s.h: New.
	* runtime/sslib/snprintf_support.c: New.
	* runtime/sslib/strcpy_s.c: New.
	* runtime/sslib/strncpy_s.c: New.
	* runtime/sslib/strnlen_s.c: New.
	* runtime/symbol_test.c: Remove.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

From-SVN: r235870
parent d9cb3e75
2016-05-04 Ilya Verbin <ilya.verbin@intel.com>
* Makefile.am: Merge from upstream, version 2.0.4420.0
<https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git>.
* README: Likewise.
* configure.ac: Likewise.
* configure.tgt: Likewise.
* include/cilk/cilk.h: Likewise.
* include/cilk/cilk_api.h: Likewise.
* include/cilk/cilk_api_linux.h: Likewise.
* include/cilk/cilk_stub.h: Likewise.
* include/cilk/cilk_undocumented.h: Likewise.
* include/cilk/common.h: Likewise.
* include/cilk/holder.h: Likewise.
* include/cilk/hyperobject_base.h: Likewise.
* include/cilk/metaprogramming.h: Likewise.
* include/cilk/reducer.h: Likewise.
* include/cilk/reducer_file.h: Likewise.
* include/cilk/reducer_list.h: Likewise.
* include/cilk/reducer_max.h: Likewise.
* include/cilk/reducer_min.h: Likewise.
* include/cilk/reducer_min_max.h: Likewise.
* include/cilk/reducer_opadd.h: Likewise.
* include/cilk/reducer_opand.h: Likewise.
* include/cilk/reducer_opmul.h: Likewise.
* include/cilk/reducer_opor.h: Likewise.
* include/cilk/reducer_opxor.h: Likewise.
* include/cilk/reducer_ostream.h: Likewise.
* include/cilk/reducer_string.h: Likewise.
* include/cilktools/cilkscreen.h: Likewise.
* include/cilktools/cilkview.h: Likewise.
* include/cilktools/fake_mutex.h: Likewise.
* include/cilktools/lock_guard.h: Likewise.
* include/internal/abi.h: Likewise.
* include/internal/cilk_fake.h: Likewise.
* include/internal/cilk_version.h: Likewise.
* include/internal/metacall.h: Likewise.
* include/internal/rev.mk: Likewise.
* mk/cilk-version.mk: Likewise.
* runtime/acknowledgements.dox: Likewise.
* runtime/bug.cpp: Likewise.
* runtime/bug.h: Likewise.
* runtime/c_reducers.c: Likewise.
* runtime/cilk-abi-cilk-for.cpp: Likewise.
* runtime/cilk-abi-vla-internal.c: Likewise.
* runtime/cilk-abi-vla-internal.h: Likewise.
* runtime/cilk-abi.c: Likewise.
* runtime/cilk-ittnotify.h: Likewise.
* runtime/cilk-tbb-interop.h: Likewise.
* runtime/cilk_api.c: Likewise.
* runtime/cilk_fiber-unix.cpp: Likewise.
* runtime/cilk_fiber-unix.h: Likewise.
* runtime/cilk_fiber.cpp: Likewise.
* runtime/cilk_fiber.h: Likewise.
* runtime/cilk_malloc.c: Likewise.
* runtime/cilk_malloc.h: Likewise.
* runtime/component.h: Likewise.
* runtime/config/generic/cilk-abi-vla.c: Likewise.
* runtime/config/generic/os-fence.h: Likewise.
* runtime/config/generic/os-unix-sysdep.c: Likewise.
* runtime/config/x86/cilk-abi-vla.c: Likewise.
* runtime/config/x86/os-fence.h: Likewise.
* runtime/config/x86/os-unix-sysdep.c: Likewise.
* runtime/doxygen-layout.xml: Likewise.
* runtime/doxygen.cfg: Likewise.
* runtime/except-gcc.cpp: Likewise.
* runtime/except-gcc.h: Likewise.
* runtime/except.h: Likewise.
* runtime/frame_malloc.c: Likewise.
* runtime/frame_malloc.h: Likewise.
* runtime/full_frame.c: Likewise.
* runtime/full_frame.h: Likewise.
* runtime/global_state.cpp: Likewise.
* runtime/global_state.h: Likewise.
* runtime/jmpbuf.c: Likewise.
* runtime/jmpbuf.h: Likewise.
* runtime/linux-symbols.ver: Likewise.
* runtime/local_state.c: Likewise.
* runtime/local_state.h: Likewise.
* runtime/mac-symbols.txt: Likewise.
* runtime/metacall_impl.c: Likewise.
* runtime/metacall_impl.h: Likewise.
* runtime/os-unix.c: Likewise.
* runtime/os.h: Likewise.
* runtime/os_mutex-unix.c: Likewise.
* runtime/os_mutex.h: Likewise.
* runtime/pedigrees.c: Likewise.
* runtime/pedigrees.h: Likewise.
* runtime/record-replay.cpp: Likewise.
* runtime/record-replay.h: Likewise.
* runtime/reducer_impl.cpp: Likewise.
* runtime/reducer_impl.h: Likewise.
* runtime/rts-common.h: Likewise.
* runtime/scheduler.c: Likewise.
* runtime/scheduler.h: Likewise.
* runtime/signal_node.c: Likewise.
* runtime/signal_node.h: Likewise.
* runtime/spin_mutex.c: Likewise.
* runtime/spin_mutex.h: Likewise.
* runtime/stats.c: Likewise.
* runtime/stats.h: Likewise.
* runtime/sysdep-unix.c: Likewise.
* runtime/sysdep.h: Likewise.
* runtime/worker_mutex.c: Likewise.
* runtime/worker_mutex.h: Likewise.
* include/cilk/reducer_vector.h: New.
* runtime/cilk_str_mem.h: New.
* runtime/config/arm/cilk-abi-vla.c: New.
* runtime/config/arm/os-fence.h: New.
* runtime/config/arm/os-unix-sysdep.c: New.
* runtime/declare-alloca.h: New.
* runtime/sslib/ignore_handler_s.c: New.
* runtime/sslib/safe_lib.h: New.
* runtime/sslib/safe_lib_errno.h: New.
* runtime/sslib/safe_str_constraint.c: New.
* runtime/sslib/safe_str_constraint.h: New.
* runtime/sslib/safe_str_lib.h: New.
* runtime/sslib/safe_types.h: New.
* runtime/sslib/safeclib_private.h: New.
* runtime/sslib/snprintf_s.h: New.
* runtime/sslib/snprintf_support.c: New.
* runtime/sslib/strcpy_s.c: New.
* runtime/sslib/strncpy_s.c: New.
* runtime/sslib/strnlen_s.c: New.
* runtime/symbol_test.c: Remove.
* Makefile.in: Regenerate.
* configure: Regenerate.
2016-04-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/60290
......
# @copyright
# Copyright (C) 2011, 2013, Intel Corporation
# Copyright (C) 2011-2016, Intel Corporation
# All rights reserved.
#
# @copyright
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
......@@ -17,7 +15,6 @@
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -30,6 +27,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
AUTOMAKE_OPTIONS = foreign
......@@ -37,7 +48,7 @@ AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .. -I ../config
# Compiler and linker flags.
GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime -I$(top_srcdir)/runtime/config/$(config_dir) -DIN_CILK_RUNTIME=1
GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime -I$(top_srcdir)/runtime/config/$(config_dir) -I$(top_srcdir)/runtime/sslib -DIN_CILK_RUNTIME=1
# GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for
# Enable Intel Cilk Plus extension
......@@ -60,6 +71,19 @@ toolexeclib_LTLIBRARIES = libcilkrts.la
libcilkrts_la_SOURCES = \
runtime/config/$(config_dir)/cilk-abi-vla.c \
runtime/config/$(config_dir)/os-unix-sysdep.c \
runtime/sslib/ignore_handler_s.c \
runtime/sslib/safe_lib.h \
runtime/sslib/safe_lib_errno.h \
runtime/sslib/safe_str_constraint.c \
runtime/sslib/safe_str_constraint.h \
runtime/sslib/safe_str_lib.h \
runtime/sslib/safe_types.h \
runtime/sslib/safeclib_private.h \
runtime/sslib/snprintf_s.h \
runtime/sslib/snprintf_support.c \
runtime/sslib/strcpy_s.c \
runtime/sslib/strncpy_s.c \
runtime/sslib/strnlen_s.c \
runtime/bug.cpp \
runtime/cilk-abi.c \
runtime/cilk-abi-cilk-for.cpp \
......@@ -85,7 +109,6 @@ libcilkrts_la_SOURCES = \
runtime/signal_node.c \
runtime/spin_mutex.c \
runtime/stats.c \
runtime/symbol_test.c \
runtime/sysdep-unix.c \
runtime/worker_mutex.c
......
......@@ -40,6 +40,9 @@ configure script:
% ./configure --prefix=/your/path/to/lib
It is also possible to use CMake if the above method does not apply
well in your environment. Instruction is available in CMakeLists.txt.
#
# 2. USING:
#
......@@ -79,6 +82,9 @@ http://cilkplus.org/
Changes to the Intel Cilk Plus runtime are welcome and should be
contributed to the upstream version via http://cilkplus.org/.
Thanks to Tobias Burnus for showing us the magic to make gcc and g++
automatically include the Cilk Plus runtime.
------------------------
Intel and Cilk are trademarks of Intel Corporation in the U.S. and/or
other countries.
This source diff could not be displayed because it is too large. You can view the blob instead.
# @copyright
# Copyright (C) 2011-2013, Intel Corporation
# Copyright (C) 2011-2016, Intel Corporation
# All rights reserved.
#
# @copyright
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
......@@ -17,7 +15,6 @@
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -30,6 +27,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
AC_INIT([Cilk Runtime Library], [2.0], [cilk@intel.com])
AC_PREREQ([2.64])
......@@ -39,6 +50,10 @@ AC_PREREQ([2.64])
AC_CANONICAL_SYSTEM
target_alias=${target_alias-$host_alias}
AC_SUBST(target_alias)
# Test for GNU extensions. Will define _GNU_SOURCE if they're available
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE(foreign no-dist)
AM_MAINTAINER_MODE
......@@ -134,6 +149,10 @@ case "${target}" in
config_dir="x86"
;;
arm-*-*)
config_dir="arm"
;;
*)
config_dir="generic"
;;
......@@ -189,8 +208,7 @@ AC_LINK_IFELSE(
# Check for pthread_{,attr_}[sg]etaffinity_np.
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#define _GNU_SOURCE
#include <pthread.h>],
[#include <pthread.h>],
[cpu_set_t cpuset;
pthread_attr_t attr;
pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
......
# @copyright
# Copyright (C) 2011-2013, Intel Corporation
# Copyright (C) 2013-2016, Intel Corporation
# All rights reserved.
#
# @copyright
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
......@@ -17,7 +15,6 @@
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -30,13 +27,29 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
# Disable Cilk Runtime library for non x86 architecture...for now.
# Disable Cilk Runtime library for unsupported architectures.
case "${target}" in
x86_64-*-*)
;;
i?86-*-*)
;;
arm-*-*)
;;
*-*-*)
UNSUPPORTED=1
;;
......
/* cilk.h -*-C++-*-
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,40 +29,54 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/
/** @file cilk.h
*
* @brief Provides convenient aliases for the Cilk language keywords.
* @brief Provides convenient aliases for Intel(R) Cilk(TM) language keywords.
*
* @details
* Since Cilk is a nonstandard extension to both C and C++, the Cilk
* language keywords all begin with “`_Cilk_`”, which guarantees that they
* Since Intel Cilk Plus is a nonstandard extension to both C and C++, the Intel
* Cilk language keywords all begin with "`_Cilk_`", which guarantees that they
* will not conflict with user-defined identifiers in properly written
* programs, so that “standard” C and C++ programs can safely be
* compiled a Cilk-enabled C or C++ compiler.
* programs. This way, a Cilk-enabled C or C++ compiler can safely compile
* "standard" C and C++ programs.
*
* However, this means that the keywords _look_ like something grafted on to
* the base language. Therefore, you can include this header:
*
* #include "cilk/cilk.h"
*
* and then write the Cilk keywords with a “`cilk_`” prefix instead of
* “`_Cilk_`”.
* and then write the Intel Cilk keywords with a "`cilk_`" prefix instead of
* "`_Cilk_`".
*
* @ingroup language
*/
/** @defgroup language Language Keywords
* Definitions having to do with the Cilk language.
* Definitions for the Intel Cilk language.
* @{
*/
#ifndef cilk_spawn
# define cilk_spawn _Cilk_spawn ///< Spawn a task that can execute in parallel.
# define cilk_sync _Cilk_sync ///< Wait for spawned tasks to complete.
# define cilk_for _Cilk_for ///< Execute iterations of a for loop in parallel.
# define cilk_for _Cilk_for ///< Execute iterations of a `for` loop in parallel.
#endif
/// @}
/*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
*/
/* THIS FILE IS DEPRECATED. USE cilk_api.h INSTEAD. */
......
/* cilk_stub.h -*-C++-*-
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -33,12 +30,26 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
*/
#ifndef INCLUDED_CILK_STUB_DOT_H
#define INCLUDED_CILK_STUB_DOT_H
/* Definitions for creating a serialization from a Cilk program.
/* Definitions for creating a serialization from an Intel(R) Cilk(TM) Plus program.
* These definitions are suitable for use by a compiler that is not
* Cilk-enabled.
*/
......@@ -47,9 +58,14 @@
#undef __cilk
#define CILK_STUB
/* Replace Cilk keywords with serial equivalents */
/* Replace Intel Cilk keywords with serial equivalents */
#define _Cilk_spawn
#define _Cilk_sync
#define _Cilk_for for
/* Replace simd-loop keywords with serial equivalents */
#define _Simd
#define _Safelen(...)
#define _Reduction(...)
#endif /* ! defined(INCLUDED_CILK_STUB_DOT_H) */
/*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
******************************************************************************
*
* cilk_undocumented.h
......@@ -83,7 +94,7 @@ CILK_EXPORT __CILKRTS_NOTHROW
void *__cilkrts_get_sf(void);
/**
* Returns the size of stacks created by Cilk.
* Returns the size of stacks created by Intel(R) Cilk(TM) Plus.
*/
CILK_EXPORT __CILKRTS_NOTHROW
size_t __cilkrts_get_stack_size(void);
......
/** common.h
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,18 +29,31 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/
/** @file common.h
*
* @brief Defines common macros and structures used by the Intel Cilk Plus
* runtime.
* @brief Defines common macros and structures used by the Intel(R) Cilk(TM) Plus runtime.
*
* @ingroup common
*/
/** @defgroup common Common Definitions
* Macro, structure, and class definitions used elsewhere in the runtime.
* Definitions for runtime macros, structures, and classes.
* @{
*/
......@@ -51,18 +61,17 @@
#define INCLUDED_CILK_COMMON
#ifdef __cplusplus
/** Namespace for all Cilk definitions that can be included in user code.
/** Namespace for all Intel Cilk Plus definitions that can be included in user code.
*/
namespace cilk {
/** Namespace for definitions that are primarily intended for use
* in other Cilk definitions.
/** Namespace for definitions re-used in other Intel Cilk Plus definitions.
*/
namespace internal {}
}
#endif
/** Cilk library version = 1.01
/** Intel Cilk Plus library version = 1.02
*/
#define CILK_LIBRARY_VERSION 102
......@@ -73,7 +82,7 @@ namespace cilk {
#endif
/**
* Prefix standard library function and type names with __STDNS in order to
* Prefix standard library function and type names with __STDNS to
* get correct lookup in both C and C++.
*/
#ifdef __cplusplus
......@@ -159,7 +168,7 @@ namespace cilk {
/**
* Macro to specify alignment of a data member in a structure.
* Because of the way that gccs alignment attribute is defined, @a n must
* Because of the way that gcc's alignment attribute is defined, @a n must
* be a numeric literal, not just a compile-time constant expression.
*/
#ifdef _WIN32
......@@ -231,7 +240,7 @@ namespace cilk {
/**
* OS-independent macro to specify a function that should be inlined
*/
#ifdef __cpluspus
#ifdef __cplusplus
// C++
# define __CILKRTS_INLINE inline
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
......@@ -247,7 +256,7 @@ namespace cilk {
/**
* Functions marked as CILK_EXPORT_AND_INLINE have both
* inline versions defined in the Cilk API, as well as
* inline versions defined in the Intel Cilk Plus API, as well as
* non-inlined versions that are exported (for
* compatibility with previous versions that did not
* inline the functions).
......@@ -306,13 +315,14 @@ namespace cilk {
#endif /* ! defined(_MSC_VER) || (_MSC_VER >= 1600) */
/**
* @brief Application Binary Interface version of the Cilk runtime library.
* @brief Application Binary Interface (ABI) version of the Intel Cilk Plus runtime
* library.
*
* The ABI version is determined by the compiler used. An object file
* compiled with a higher ABI version is not compatible with a library that is
* compiled with a lower ABI version. An object file compiled with a lower
* ABI version, however, can be used with a library compiled with a higher ABI
* version unless otherwise stated.
* The compiler determines the ABI version used for compilation. Object files
* compiled with higher ABI versions are not compatible with libraries compiled
* with lower ABI versions. However, an object file compiled with a lower ABI
* version can be used with a library compiled with a higher ABI version
* (unless otherwise stated.)
*/
#ifndef __CILKRTS_ABI_VERSION
# ifdef IN_CILK_RUNTIME
......
/*
* @copyright
* Copyright (C) 2011-2013, Intel Corporation
* Copyright (C) 2011-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
*/
/*
......@@ -60,8 +71,8 @@
* common variable where it is not necessary to preserve changes from
* different parallel strands. In effect, a holder acts a bit like
* thread-local storage, but has qualities that work better with the
* fork-join structure of Cilk. In particular, a holder has the following
* qualities:
* fork-join structure of Intel(R) Cilk(TM) Plus. In particular, a holder has the
* following qualities:
*
* - The view of a holder before the first spawn within a function is the same
* as the view after each sync (as in the case of a reducer).
......@@ -220,7 +231,7 @@
* same as the view on entry to 'h'. More importantly, the view of the holder
* within the recursive call to 'compute' is the same as the view on entry to
* 'h', even if a different worker is executing the recursive call. Thus, the
* holder view within a Cilk program has useful qualities not found in
* holder view within a Intel Cilk Plus program has useful qualities not found in
* thread-local storage.
*/
......
/*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
*/
#ifndef INCLUDED_CILK_HYPEROBJECT_BASE
......@@ -49,7 +60,7 @@
#if defined _WIN32 || defined _WIN64
# if !defined CILK_STUB && !defined IN_CILK_RUNTIME
/* bring in the Cilk library, which has definitions for some of these
/* bring in the Intel(R) Cilk(TM) Plus library, which has definitions for some of these
* functions. */
# pragma comment(lib, "cilkrts")
# endif
......@@ -126,7 +137,7 @@ CILK_EXPORT
#else // CILK_STUB
// Programs compiled with CILK_STUB are not linked with the Cilk runtime
// Programs compiled with CILK_STUB are not linked with the Intel Cilk Plus runtime
// library, so they should not have external references to cilkrts functions.
// Furthermore, they don't need the hyperobject functionality, so the
// functions can be stubbed.
......
/* metaprogramming.h -*- C++ -*-
*
* @copyright
* Copyright (C) 2012-2013, Intel Corporation
* Copyright (C) 2012-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,11 +29,25 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/
/** @file metaprogramming.h
*
* @brief Defines metaprogramming utility classes used in the Cilk library.
* @brief Defines metaprogramming utility classes used in the Intel(R) Cilk(TM) Plus library.
*
* @ingroup common
*/
......@@ -61,7 +72,7 @@ namespace internal {
/** Test if a class is empty.
*
* If @a Class is an empty (and therefore necessarily stateless) class, then
* the “empty base-class optimization” guarantees that
* the "empty base-class optimization" guarantees that
* `sizeof(check_for_empty_class<Class>) == sizeof(char)`. Conversely, if
* `sizeof(check_for_empty_class<Class>) > sizeof(char)`, then @a Class is not
* empty, and we must discriminate distinct instances of @a Class.
......@@ -147,7 +158,7 @@ public:
* @tparam Size The required minimum size of the resulting class.
* @tparam Alignment The required alignment of the resulting class.
*
* @pre @a Alignment shall be a power of 2 no greater then 64.
* @pre @a Alignment shall be a power of 2 no greater than 64.
*
* @note This is implemented using the `CILK_ALIGNAS` macro, which uses
* the non-standard, implementation-specific features
......@@ -165,6 +176,7 @@ public:
template <std::size_t Size, std::size_t Alignment>
struct aligned_storage;
/// @cond
template<std::size_t Size> class aligned_storage<Size, 1>
{ CILK_ALIGNAS( 1) char m_bytes[Size]; };
template<std::size_t Size> class aligned_storage<Size, 2>
......@@ -179,7 +191,7 @@ template<std::size_t Size> class aligned_storage<Size, 32>
{ CILK_ALIGNAS(32) char m_bytes[Size]; };
template<std::size_t Size> class aligned_storage<Size, 64>
{ CILK_ALIGNAS(64) char m_bytes[Size]; };
/// @endcond
/** A buffer of uninitialized bytes with the same size and alignment as a
* specified type.
......@@ -210,15 +222,16 @@ class storage_for_object :
public:
/// Return a typed reference to the buffer.
const Type& object() const { return *reinterpret_cast<Type*>(this); }
/// Return a typed reference to the buffer.
Type& object() { return *reinterpret_cast<Type*>(this); }
};
/** Get the functor class corresponding to a binary function type.
*
* The `binary_functor` template class class can be instantiated with a binary
* The `binary_functor` template class can be instantiated with a binary
* functor class or with a real binary function, and will yield an equivalent
* binary functor class class in either case.
* binary functor class in either case.
*
* @tparam F A binary functor class, a binary function type, or a pointer to
* binary function type.
......@@ -260,7 +273,7 @@ struct binary_functor<R(*)(A,B)> {
* `typed_indirect_binary_function<F>` is an `Adaptable Binary Function` class
* based on an existing binary functor class or binary function type @a F. If
* @a F is a stateless class, then this class will be empty, and its
* `operator()` will invoke @a Fs `operator()`. Otherwise, an object of this
* `operator()` will invoke @a F's `operator()`. Otherwise, an object of this
* class will hold a pointer to an object of type @a F, and will refer its
* `operator()` calls to the pointed-to @a F object.
*
......@@ -276,7 +289,8 @@ struct binary_functor<R(*)(A,B)> {
*
* @note Just to repeat: if `F` is an empty class, then
* `typed_indirect_binary_function\<F\>' is also an empty class.
* This is critical for its use in the @ref min_max::view_base
* This is critical for its use in the
* @ref cilk::cilk_lib_1_1::min_max_internal::view_base
* "min/max reducer view classes", where it allows the view to
* call a comparison functor in the monoid without actually
* having to allocate a pointer in the view class when the
......@@ -343,10 +357,11 @@ public:
/** Indirect binary function class with inferred types.
*
* This is identical to @ref typed_indirect_binary_function, except that it
* derives the binary function argument and result types from the parameter
* type @a F instead of taking them as additional template parameters. If @a F
* is a class type, then it must be an `Adaptable Binary Function`.
* This is identical to @ref cilk::internal::typed_indirect_binary_function,
* except that it derives the binary function argument and result types from
* the parameter type @a F instead of taking them as additional template
* parameters. If @a F is a class type, then it must be an `Adaptable Binary
* Function`.
*
* @see typed_indirect_binary_function
*
......@@ -373,7 +388,7 @@ public:
/** Choose a type based on a boolean constant.
*
* This metafunction is identical to C++11s condition metafunction.
* This metafunction is identical to C++11's condition metafunction.
* It needs to be here until we can reasonably assume that users will be
* compiling with C++11.
*
......@@ -468,7 +483,7 @@ inline void* allocate_aligned(std::size_t size, std::size_t alignment)
#ifdef _WIN32
return _aligned_malloc(size, alignment);
#else
#if defined(__ANDROID__)
#if defined(__ANDROID__) || defined(__VXWORKS__)
return memalign(std::max(alignment, sizeof(void*)), size);
#else
void* ptr;
......
/*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -18,7 +16,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
*/
/* reducer_max.h -*- C++ -*-
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/
/** @file reducer_max.h
......
/* reducer_min.h -*- C++ -*-
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -19,7 +17,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*/
/** @file reducer_min.h
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
#ifndef INCLUDED_CILKSCREEN_H
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
#ifndef INCLUDED_CILKVIEW_H
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2013, Intel Corporation
* Copyright (C) 2013-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************
*
* Cilkscreen fake mutexes are provided to indicate to the Cilkscreen race
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2011-2013, Intel Corporation
* Copyright (C) 2011-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************
*
* Lock guard patterned after the std::lock_guard class template proposed in
......
/*
* abi.h
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -20,7 +18,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
******************************************************************************/
/**
......@@ -461,6 +472,20 @@ CILK_ABI(void) __cilkrts_enter_frame_fast_1(__cilkrts_stack_frame *sf);
CILK_ABI(void) __cilkrts_leave_frame(__cilkrts_stack_frame *sf);
/**
* Suspends the runtime by notifying the workers that they should not try to
* steal. This function is supposed to be called from a non-parallel region
* (i.e., after cilk_sync in the top-level spawning function). Otherwise,
* which workers are sleeping or busy is unpredictable in general.
* The runtime can be resumed by calling __cilkrts_resume().
*/
CILK_ABI(void) __cilkrts_suspend(void);
/**
* Resumes the runtime by notifying the workers that they can steal.
*/
CILK_ABI(void) __cilkrts_resume(void);
/**
* Wait for any spawned children of this function to complete before
* continuing. This function will only return when the join counter
* has gone to 0. Other workers will re-enter the scheduling loop to
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2011-2013, Intel Corporation
* Copyright (C) 2011-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
// cilk_version.h
//
// @copyright
// Copyright (C) 2009-2013, Intel Corporation
// Copyright (C) 2009-2016, Intel Corporation
// All rights reserved.
//
// @copyright
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
......@@ -19,7 +17,6 @@
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// @copyright
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,16 +29,30 @@
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
// WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// *********************************************************************
//
// PLEASE NOTE: This file is a downstream copy of a file mainitained in
// a repository at cilkplus.org. Changes made to this file that are not
// submitted through the contribution process detailed at
// http://www.cilkplus.org/submit-cilk-contribution will be lost the next
// time that a new version is released. Changes only submitted to the
// GNU compiler collection or posted to the git repository at
// https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
// not tracked.
//
// We welcome your contributions to this open source project. Thank you
// for your assistance in helping us improve Cilk Plus.
// DO NOT EDIT THIS FILE!
//
// It was automatically generated by cilkrts/include/internal/Makefile
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_BUILD 3902
#define VERSION_BUILD 4420
#define VERSION_REV 0
#define VERSION_STRING "2,0,3902,0"
#define VERSION_HASH "b4e38f4f7e3e"
#define VERSION_BRANCH "v14.0"
#define TBB_REV_NUMBER ""
#define VERSION_YEAR "2013"
#define VERSION_STRING "2,0,4420,0"
#define VERSION_HASH "3b2d6aa9059c"
#define VERSION_BRANCH "eng"
#define TBB_REV_NUMBER "14788"
#define VERSION_YEAR "2015"
// -*- C++ -*-
/*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -20,7 +18,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
******************************************************************************
*
* metacall.h
......
#########################################################################
#
# @copyright
# Copyright (C) 2011-2013, Intel Corporation
# Copyright (C) 2011-2016, Intel Corporation
# All rights reserved.
#
# @copyright
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
......@@ -19,7 +17,6 @@
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,10 +29,24 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
###########################################################################
# DO NOT EDIT THIS FILE!
#
# It was automatically generated by cilkrts/include/internal/Makefile
CILK_REVISION = 3902
CILK_REVISION = 4420
#########################################################################
#
# @copyright
# Copyright (C) 2009-2013, Intel Corporation
# Copyright (C) 2009-2016, Intel Corporation
# All rights reserved.
#
# @copyright
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
......@@ -19,7 +17,6 @@
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
###########################################################################
# cilk-version.mk
#
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/*
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "bug.h"
......@@ -54,7 +65,7 @@ __CILKRTS_BEGIN_EXTERN_C
COMMON_PORTABLE const char *const __cilkrts_assertion_failed =
"%s:%d: cilk assertion failed: %s\n";
COMMON_PORTABLE void __cilkrts_bug(const char *fmt,...) cilk_nothrow
COMMON_PORTABLE NORETURN __cilkrts_bug(const char *fmt,...) cilk_nothrow
{
#if defined (_WIN32) && defined(_DEBUG)
_CRTIMP void __cdecl _wassert(__in_z const wchar_t * _Message,
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/* Implementation of C reducers */
......@@ -47,6 +58,13 @@
#define CILK_C_DEFINE_REDUCERS
#ifdef _WRS_KERNEL
#define WCHAR_MIN 0
#define WCHAR_MAX USHRT_MAX
#define WINT_MIN INT_MIN
#define WINT_MAX INT_MAX
#endif
#include <cilk/reducer_opadd.h>
#include <cilk/reducer_opand.h>
#include <cilk/reducer_opmul.h>
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2011, 2013, Intel Corporation
* Copyright (C) 2011-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/* Implementation of cilk_for ABI.
......@@ -405,6 +416,9 @@ CILK_ABI_THROWS_VOID __cilkrts_cilk_for_32(__cilk_abi_f32_t body, void *data,
CILK_ABI_THROWS_VOID __cilkrts_cilk_for_64(__cilk_abi_f64_t body, void *data,
cilk64_t count, int grain)
{
// Cilkscreen should not report this call in a stack trace
NOTIFY_ZC_INTRINSIC((char *)"cilkscreen_hide_call", 0);
// Check for an empty range here as an optimization - don't need to do any
// __cilkrts_stack_frame initialization
if (count > 0)
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2013, Intel Corporation
* Copyright (C) 2013-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/*
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2013, Intel Corporation
* Copyright (C) 2013-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/**
......@@ -296,6 +307,45 @@ CILK_ABI_VOID __cilkrts_sync(__cilkrts_stack_frame *sf)
__cilkrts_c_sync(w, sf);
}
/**
* Suspends the runtime by notifying the workers that they should not try to
* steal. This function is supposed to be called from a non-parallel region
* (i.e., after cilk_sync in the top-level spawning function). Otherwise,
* which workers are sleeping or busy is unpredictable in general.
* The runtime can be resumed by calling __cilkrts_resume().
*/
CILK_ABI_VOID __cilkrts_suspend(void)
{
global_state_t *g = cilkg_get_global_state();
if (NULL == g || g->P < 2)
return;
__cilkrts_worker *w = __cilkrts_get_tls_worker();
// Do nothing if worker/frame is not available
if (NULL == w || NULL == w->current_stack_frame)
return;
// Do nothing if this was called within a parallel region.
__cilkrts_stack_frame *sf = w->current_stack_frame;
if (0 == (sf->flags & CILK_FRAME_LAST) || (sf->flags & CILK_FRAME_UNSYNCHED))
return;
__cilkrts_worker *root = g->workers[0];
root->l->steal_failure_count = g->max_steal_failures + 1;
CILK_ASSERT(root->l->signal_node);
signal_node_msg(root->l->signal_node, 0);
}
/**
* Resumes the runtime by notifying the workers that they can steal.
*/
CILK_ABI_VOID __cilkrts_resume(void)
{
global_state_t *g = cilkg_get_global_state();
if (NULL == g || g->P < 2)
return;
__cilkrts_worker *root = g->workers[0];
CILK_ASSERT(root->l->signal_node);
signal_node_msg(root->l->signal_node, 1);
}
/*
* __cilkrts_get_sf
*
......@@ -391,6 +441,10 @@ CILK_ABI_WORKER_PTR BIND_THREAD_RTN(void)
__cilkrts_set_tls_worker(w);
__cilkrts_cilkscreen_establish_worker(w);
START_INTERVAL(w, INTERVAL_IN_SCHEDULER);
START_INTERVAL(w, INTERVAL_IN_RUNTIME);
{
full_frame *ff = __cilkrts_make_full_frame(w, 0);
......@@ -462,13 +516,10 @@ CILK_ABI_WORKER_PTR BIND_THREAD_RTN(void)
global_os_mutex_unlock();
/* If there's only 1 worker, the counts will be started in
* __cilkrts_scheduler */
if (g->P > 1)
{
START_INTERVAL(w, INTERVAL_IN_SCHEDULER);
/* We are about to switch back into user code after binding the
thread. Start working again. */
STOP_INTERVAL(w, INTERVAL_IN_RUNTIME);
START_INTERVAL(w, INTERVAL_WORKING);
}
ITT_SYNC_RELEASING(&unique_obj);
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#ifndef INCLUDED_CILK_ITTNOTIFY_DOT_H
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/*
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2012-2013, Intel Corporation
* Copyright (C) 2012-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "cilk_fiber-unix.h"
......@@ -47,33 +58,32 @@
#include <errno.h>
#include <sys/mman.h>
#include <unistd.h>
// You'd think that getting a defintion for alloca would be easy. But you'd
// be wrong. Here's a variant on what's recommended in the autoconf doc. I've
// remove the Windows portion since this is Unix-specific code.
#if defined HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include "declare-alloca.h"
// MAP_ANON is deprecated on Linux, but seems to be required on Mac...
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
# define MAP_ANONYMOUS MAP_ANON
#endif
// MAP_STACK and MAP_GROWSDOWN have no affect in Linux as of 2014-04-04, but
// could be very useful in future versions. If they are not defined, then set
// them to zero (no bits set).
#ifndef MAP_STACK
# define MAP_STACK 0
#endif
#ifndef MAP_GROWSDOWN
# define MAP_GROWSDOWN 0
#endif
// Magic number for sanity checking fiber structure
const unsigned magic_number = 0x5afef00d;
int cilk_fiber_sysdep::s_page_size = getpagesize();
// Page size for stacks
#ifdef _WRS_KERNEL
long cilk_fiber_sysdep::s_page_size = 4096;
#else
long cilk_fiber_sysdep::s_page_size = sysconf(_SC_PAGESIZE);
#endif
cilk_fiber_sysdep::cilk_fiber_sysdep(std::size_t stack_size)
: cilk_fiber(stack_size)
......@@ -270,7 +280,7 @@ void cilk_fiber_sysdep::make_stack(size_t stack_size)
p = (char*)mmap(0, rounded_stack_size,
PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS,
MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK|MAP_GROWSDOWN,
-1, 0);
if (MAP_FAILED == p) {
// For whatever reason (probably ran out of memory), mmap() failed.
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2012-2013, Intel Corporation
* Copyright (C) 2012-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#ifndef INCLUDED_CILK_FIBER_UNIX_DOT_H
......@@ -127,12 +138,11 @@ struct cilk_fiber_sysdep : public cilk_fiber
private:
char* m_stack_base; ///< The base of this fiber's stack.
char* m_stack; // Stack memory (low address)
__CILK_JUMP_BUFFER m_resume_jmpbuf; // Place to resume fiber
unsigned m_magic; // Magic number for checking
char* m_stack; ///< Stack memory (low address)
__CILK_JUMP_BUFFER m_resume_jmpbuf; ///< Place to resume fiber
unsigned m_magic; ///< Magic number for checking
static int s_page_size; // Page size for
// stacks.
static long s_page_size; ///< Page size for stacks.
// Allocate memory for a stack. This method
// initializes m_stack and m_stack_base.
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2012-2013, Intel Corporation
* Copyright (C) 2012-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/* Implementations of non-platform-specific aspects of cilk_fiber, especially
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2012-2013, Intel Corporation
* Copyright (C) 2012-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,12 +31,26 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "cilk_malloc.h"
#include <stdlib.h>
#if defined _WIN32 || defined _WIN64 || defined __linux__
#if defined _WIN32 || defined _WIN64 || defined __GLIBC__ || defined __linux__
#include <malloc.h>
#define HAS_MEMALIGN 1
#endif
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
/* cilk_str_mem.h -*-C-*-
*
*************************************************************************
*
* Copyright (C) 2014-2016, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
* @file cilk_str_mem.h
*
* @breif Interface to safe string/memmory C API to replace banned C API.
*/
#ifndef INCLUDED_CILK_STR_MEM_DOT_H
#define INCLUDED_CILK_STR_MEM_DOT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _WIN32
# include "safe_lib.h"
# include "snprintf_s.h"
#define cilk_strlen(str) strnlen_s(str, RSIZE_MAX_STR)
#define cilk_strcpy_s strcpy_s
// Different sprintf entries with different argument lists.
#define cilk_snprintf_s snprintf_s_s
#define cilk_snprintf_i snprintf_s_i
#define cilk_snprintf_l snprintf_s_l
#define cilk_snprintf_si snprintf_s_si
#define cilk_snprintf_sl snprintf_s_sl
#else // ! defined _WIN32
#define CILK_MAX_STR (4UL << 10) // 4KB
#define cilk_strlen(str) strnlen_s(str, CILK_MAX_STR)
#define cilk_strcpy_s strcpy_s
#define cilk_snprintf_s sprintf_s
#define cilk_snprintf_i sprintf_s
#define cilk_snprintf_l sprintf_s
#define cilk_snprintf_si sprintf_s
#define cilk_snprintf_sl sprintf_s
#endif // ! defined _WIN32
#ifdef __cplusplus
}
#endif
#endif // INCLUDED_CILK_STR_MEM_DOT_H
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#ifndef INCLUDED_COMPONENT_DOT_H
......
/* cilk-abi-vla.cpp -*-C++-*-
*
*************************************************************************
*
* Copyright (C) 2013-2016, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/*
* Implementation of Variable Length Array (VLA) ABI.
*
* The compiler calls these functions to allocate Variable Length Arrays
* at runtime. The compiler must guarantee that __cilkrts_stack_free() is
* called to cleanup any memory allocated by __cilkrts_stack_alloc().
*
* This generic implementation always allocates the memory from the heap.
* Optimally, the implementation should expand the frame of the calling
* function if possible, since that will be faster. See the x86 version
* for one possible implementation.
*/
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include "internal/abi.h"
#include "cilk-abi-vla-internal.h"
// Allocate space for a variable length array
CILK_ABI(__cilkrts_void_ptr)
__cilkrts_stack_alloc(
__cilkrts_stack_frame *sf,
size_t size,
size_t distance_from_sp_to_alloca_area,
uint32_t align, // align is always >= minimum stack alignment and
// >= ptr_size as well, and must be a power of 2.
uint32_t needs_tag // non-zero if the pointer being returned needs to
// be tagged
)
{
// full_size will be a multiple of align, and contains
// enough extra space to allocate a marker.
size_t full_size = (size + align - 1) & ~(align - 1);
// Allocate memory from the heap. The compiler is responsible
// for guaranteeing us a chance to free it before the function
// exits
return (void *)vla_internal_heap_alloc(sf, full_size, align);
}
// Free the space allocated for a variable length array.
CILK_ABI(void)
__cilkrts_stack_free(
__cilkrts_stack_frame *sf,
void *p,
size_t size,
size_t distance_from_sp_to_alloca_area,
uint32_t align, // same requirements as for align in allocation,
// and must match alignment that was passed when
// doing the allocation
uint32_t known_from_stack // non-zero if this is known to be allocated
// on the stack, and therefore has no tag
)
{
// full_size will be a multiple of align, and contains
// enough extra space to allocate a marker if one was needed.
size_t full_size = (size + align - 1) & ~(align - 1);
// Just free the allocated memory to the heap since we don't know
// how to expand/contract the calling frame
vla_internal_heap_free(p, full_size);
}
/* symbol_test.c -*-C-*-
/* os.h -*-C++-*-
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,30 +31,34 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/* simple program to verify that there are no undefined symbols in the runtime.
* If the runtime uses any symbols that are not defined, compiling this program
* will cause a linker error.
/*
* void __cilkrts_fence(void)
*
* Executes an MFENCE instruction to serialize all load and store instructions
* that were issued prior the MFENCE instruction. This serializing operation
* guarantees that every load and store instruction that precedes the MFENCE
* instruction is globally visible before any load or store instruction that
* follows the MFENCE instruction. The MFENCE instruction is ordered with
* respect to all load and store instructions, other MFENCE instructions, any
* SFENCE and LFENCE instructions, and any serializing instructions (such as
* the CPUID instruction).
*/
#define _Cilk_for for
extern void* __cilkrts_global_state;
void *volatile p;
void foo () { }
int main ()
{
int i;
long long j;
_Cilk_spawn foo();
_Cilk_for (i = 0; i < 2; ++i)
foo();
_Cilk_for (j = 0; j < 2; ++j)
foo();
p = __cilkrts_global_state;
return 0;
}
/* End symbol_test.c */
// COMMON_SYSDEP void __cilkrts_fence(void); ///< MFENCE instruction
# define __cilkrts_fence() __asm__ __volatile__ ("mcr p15,0,%[t],c7,c10,4\n" :: [t] "r" (0) : "memory");
/* os-unix-sysdep.c -*-C-*-
*
*************************************************************************
*
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*************************************************************************
*
* This file contains generic implementations of system-specific code for
* Unix-based systems
*/
#include "os.h"
#include "sysdep.h"
/*
* The cycle counter is used for debugging. This funciton is only called if
* CILK_PROFILE is defined when the runtime is built.
*/
COMMON_SYSDEP unsigned long long __cilkrts_getticks(void)
{
# warning "unimplemented cycle counter"
return 0;
}
/*
* A "short pause" - called from the Cilk runtime's spinloops.
*/
COMMON_SYSDEP void __cilkrts_short_pause(void)
{
# warning __cilkrts_short_pause empty
}
/*
* Interlocked exchange - used to implement the Cilk runtime's spinloops
*/
COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x)
{
x = __sync_lock_test_and_set(ptr, x);
return x;
}
/*
* Restore the floating point state that is stored in a stack frame at each
* spawn. This should be called each time a frame is resumed.
*
* Only valid for IA32 and Intel64 processors.
*/
void restore_x86_fp_state (__cilkrts_stack_frame *sf)
{
}
/*
* Save the floating point state to the __cilkrts_stack_frame at each spawn.
*
* Architecture-specific - Should only be needed on IA32 and Intel64
* processors.
*/
void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf)
{
}
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2013, Intel Corporation
* Copyright (C) 2013-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/*
......@@ -103,5 +114,5 @@ __cilkrts_stack_free(
// Just free the allocated memory to the heap since we don't know
// how to expand/contract the calling frame
vla_internal_heap_free(t, full_size);
vla_internal_heap_free(p, full_size);
}
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/*
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*************************************************************************
*
* This file contains generic implementations of system-specific code for
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2013, Intel Corporation
* Copyright (C) 2013-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/*
......@@ -58,25 +69,7 @@
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
// Getting a definition for alloca appears to be a pain in the butt. Here's
// a variant on what's recommended in the autoconf doc
#if defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#elif defined HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include "declare-alloca.h"
#ifdef _WIN32
# define INLINE static __inline
......@@ -89,6 +82,8 @@ void *alloca (size_t);
#include "internal/abi.h"
#include "cilk-abi-vla-internal.h"
#ifdef __INTEL_COMPILER
// These functions are used only within __INTEL_COMPILER.
#if defined(__x86_64) || defined(_M_X64)
INLINE void setsp(void *val)
{
......@@ -151,7 +146,7 @@ INLINE void copy_frame_up_and_move_bp(
"movq %2, %%rcx;"
"shrq $3, %%rcx;"
"std; rep movsq; cld;"
"movl %3, %%rbp;" :
"movq %3, %%rbp;" :
:
"rm"(dst), "rm"(src), "rm"(cpy_bytes), "rm"(new_ebp) :
"rsi", "rdi", "rcx", "rbp", "memory");
......@@ -226,6 +221,7 @@ INLINE void copy_frame_up_and_move_bp(
}
#endif
#endif // __INTEL_COMPILER
#define c_cilk_ptr_from_heap 0xc2f2f00d
#define c_cilk_ptr_from_stack 0xc3f30d0f
......@@ -241,11 +237,17 @@ __cilkrts_stack_alloc(
// be tagged
)
{
#ifdef __INTEL_COMPILER
// full_size will be a multiple of align, and contains
// enough extra space to allocate a marker.
size_t full_size = (size + align - 1) & ~(align - 1);
#ifndef __INTEL_COMPILER
// Allocate memory from the heap. The compiler is responsible
// for guaranteeing us a chance to free it before the function
// exits
return (void *)vla_internal_heap_alloc(sf, full_size, align);
#else
if (needs_tag) {
full_size += align;
}
......@@ -336,10 +338,7 @@ __cilkrts_stack_alloc(
}
return t;
#else // Not __INTEL_COMPILER
// Not supported unless we can figure out how to get the size of the frame
return NULL;
#endif
#endif // __INTEL_COMPILER
}
// This frees the space allocated for a variable length array.
......@@ -356,12 +355,17 @@ __cilkrts_stack_free(
// on the stack, and therefore has no tag
)
{
#ifdef __INTEL_COMPILER
uint32_t *t = (uint32_t*)p;
// full_size will be a multiple of align, and contains
// enough extra space to allocate a marker if one was needed.
size_t full_size = (size + align - 1) & ~(align - 1);
#ifndef __INTEL_COMPILER
// Just free the allocated memory to the heap since we don't know
// how to expand/contract the calling frame
vla_internal_heap_free(p, full_size);
#else
uint32_t *t = (uint32_t*)p;
if (known_from_stack == 0) {
// if the compiler hasn't told the run-time that this is
// known to be on the stack, then this pointer must have been
......@@ -435,7 +439,5 @@ __cilkrts_stack_free(
else {
vla_internal_heap_free(t, full_size);
}
#else // Not __INTEL_COMPILER
// Not supported unless we can figure out how to get the size of the frame
#endif
#endif // __INTEL_COMPILER
}
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/* gcc before 4.4 does not implement __sync_synchronize properly */
......
......@@ -2,7 +2,7 @@
*
*************************************************************************
*
* Copyright (C) 2009-2014, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -31,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*************************************************************************
*
* This file contains system-specific code for Unix systems
......@@ -96,7 +110,7 @@ COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x)
* This declaration should generate an error when the Intel compiler adds
* supprt for the intrinsic.
*/
#ifdef __INTEL_COMPILER
#if defined(__INTEL_COMPILER) || defined(__clang__)
static inline int __builtin_cpu_supports(const char *feature)
{
return 1;
......@@ -124,7 +138,6 @@ void restore_x86_fp_state (__cilkrts_stack_frame *sf) {
#endif
}
void sysdep_save_fp_ctrl_state(__cilkrts_stack_frame *sf)
{
// If we're not going to restore, don't bother saving it
......
/* cilk-abi-vla.cpp -*-C++-*-
*
*************************************************************************
*
* Copyright (C) 2013-2016, Intel Corporation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/*
* You'd think that getting a declaration for alloca would be easy. But you'd
* be wrong. Here's a variant on what's recommended in the autoconf doc
*/
#if defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#elif defined HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
<doxygenlayout version="1.0">
<!--
# @copyright
# Copyright (C) 2011-2013, Intel Corporation
# Copyright (C) 2011-2016, Intel Corporation
# All rights reserved.
#
# @copyright
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
......@@ -20,7 +18,6 @@
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -33,6 +30,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
-->
<!-- Navigation index tabs for HTML output -->
......
# Doxyfile 1.7.4
# @copyright
# Copyright (C) 2011-2013, Intel Corporation
# Copyright (C) 2011-2016, Intel Corporation
# All rights reserved.
#
# @copyright
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
......@@ -19,7 +17,6 @@
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# @copyright
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -32,6 +29,20 @@
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# *********************************************************************
#
# PLEASE NOTE: This file is a downstream copy of a file mainitained in
# a repository at cilkplus.org. Changes made to this file that are not
# submitted through the contribution process detailed at
# http://www.cilkplus.org/submit-cilk-contribution will be lost the next
# time that a new version is released. Changes only submitted to the
# GNU compiler collection or posted to the git repository at
# https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
# not tracked.
#
# We welcome your contributions to this open source project. Thank you
# for your assistance in helping us improve Cilk Plus.
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "except-gcc.h"
......@@ -100,12 +111,12 @@ static void
decode_exceptions(char *out, size_t len, struct pending_exception_info *info)
{
if (info->empty())
snprintf(out, len, "[empty]");
cilk_snprintf_s(out, len, "%s", "[empty]");
else if (info->rethrow)
snprintf(out, len, "[rethrow %p]",
cilk_snprintf_l(out, len, "[rethrow %p]",
info->runtime_state.caughtExceptions);
else
snprintf(out, len, "[throw %p]", (void *)info->active);
cilk_snprintf_l(out, len, "[throw %p]", (void *)info->active);
}
#endif
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "frame_malloc.h"
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
#include "full_frame.h"
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#ifndef INCLUDED_FULL_FRAME_DOT_H
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "global_state.h"
......@@ -69,9 +80,10 @@ namespace {
// cilkg_get_user_settable_values() is called and partially-zero-filled until
// cilkg_init_global_state() is called. The first field is filled in with
// the size of a void* for the debugger and must be valid before initialization
global_state_t global_state_singleton =
static global_state_t global_state_singleton =
{
sizeof(void *), // addr_size
GLOBAL_STATE_VERSION, // structure version
};
......@@ -93,13 +105,15 @@ inline bool strmatch(const char* a, const char* b)
return 0 == std::strcmp(a, b);
}
// Returns the integer value represented by the null-terminated string at 's'.
// Returns the integer value represented by the null-terminated, decimal string
// at 's'.
inline long to_long(const char* s)
{
char *end;
errno = 0;
return std::strtol(s, &end, 0);
return std::strtol(s, &end, 10);
}
#ifdef _WIN32
......@@ -571,7 +585,6 @@ global_state_t* cilkg_init_global_state()
void cilkg_publish_global_state(global_state_t* g)
{
// TBD: which one of these needs to be executed first? I say
// cilkg_singleton_ptr needs to be set last, with a mfence in
// between, since it is the flag that cilkg_is_published_is
......@@ -584,7 +597,15 @@ void cilkg_publish_global_state(global_state_t* g)
void cilkg_deinit_global_state()
{
cilkg_singleton_ptr = NULL;
__cilkrts_global_state = NULL;
// The pointer to the global state needs to remain valid for the
// debugger. Thus, we can't clear the following pointer.
// __cilkrts_global_state = NULL;
// We also don't reset the global state, so that if we resume
// execution after ending Cilk, user set variables (e.g., # of
// workers) remains valid.
}
int cilkg_is_published(void)
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......@@ -70,6 +81,16 @@ enum record_replay_t {
};
/**
* @brief Global state structure version.
*
* Since the global state is exposed for debugger access, we need a version
* number to let it know that the version of the structure is what it expects
* to see. If any of the fields marked as (fixed) below are changed, the
* version number needs to be bumped.
*/
#define GLOBAL_STATE_VERSION 0
/**
* @brief The global state is a structure that is shared by all workers in
* Cilk.
*
......@@ -109,7 +130,9 @@ struct global_state_t { /* COMMON_PORTABLE */
* debugger integration library will need to be changed to match!!!
*************************************************************************/
int addr_size; ///< Number of bytes for an address, used by debugger (fixed)
uint16_t addr_size; ///< Number of bytes for an address, used by debugger (fixed)
uint16_t version; ///< Version of this structure (fixed)
int system_workers; ///< Number of system workers (fixed)
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "jmpbuf.h"
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
/*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -20,7 +18,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -33,6 +30,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
CILKABI0
......@@ -87,11 +98,13 @@ CILKABI1
__cilkrts_get_sf;
__cilkrts_get_stack_size;
__cilkrts_get_worker_rank;
__cilkrts_resume;
__cilkrts_save_fp_ctrl_state;
__cilkrts_stack_alloc;
__cilkrts_stack_free;
__cilkrts_suspend;
__cilkrts_watch_stack;
} CILKABI0;
};
CILKLIB1.02
{
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
#include "local_state.h"
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......
......@@ -7,7 +7,7 @@ ___cilkrts_bump_worker_rank
___cilkrts_bump_worker_rank_internal
___cilkrts_cilk_for_32
___cilkrts_cilk_for_64
___cilkrts_debugger_notification
___cilkrts_dump_stats
___cilkrts_end_cilk
___cilkrts_enter_frame
......@@ -33,15 +33,17 @@ ___cilkrts_hyperobject_alloc
___cilkrts_hyperobject_dealloc
___cilkrts_hyperobject_noop_destroy
___cilkrts_init
___cilkrts_irml_version
___cilkrts_leave_frame
___cilkrts_metacall
___cilkrts_resume
___cilkrts_rethrow
___cilkrts_return_exception
___cilkrts_save_fp_ctrl_state
___cilkrts_set_param
___cilkrts_stack_alloc
___cilkrts_stack_free
___cilkrts_suspend
___cilkrts_sync
___cilkrts_synched
___cilkrts_watch_stack
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
#include "metacall_impl.h"
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2010-2013, Intel Corporation
* Copyright (C) 2010-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -35,6 +32,20 @@
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
*
**************************************************************************/
/**
......
......@@ -2,11 +2,9 @@
*
*************************************************************************
*
* @copyright
* Copyright (C) 2009-2013, Intel Corporation
* Copyright (C) 2009-2016, Intel Corporation
* All rights reserved.
*
* @copyright
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
......@@ -21,7 +19,6 @@
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* @copyright
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -34,6 +31,20 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* *********************************************************************
*
* PLEASE NOTE: This file is a downstream copy of a file mainitained in
* a repository at cilkplus.org. Changes made to this file that are not
* submitted through the contribution process detailed at
* http://www.cilkplus.org/submit-cilk-contribution will be lost the next
* time that a new version is released. Changes only submitted to the
* GNU compiler collection or posted to the git repository at
* https://bitbucket.org/intelcilkruntime/intel-cilk-runtime.git are
* not tracked.
*
* We welcome your contributions to this open source project. Thank you
* for your assistance in helping us improve Cilk Plus.
**************************************************************************/
/**
......@@ -49,6 +60,7 @@
#include "rts-common.h"
#include "cilk/common.h"
#include "cilk-tbb-interop.h"
#include "cilk_str_mem.h"
#ifdef __cplusplus
# include <cstddef>
......@@ -156,6 +168,7 @@ COMMON_SYSDEP int __cilkrts_xchg(volatile int *ptr, int x);
COMMON_SYSDEP void __cilkrts_sleep(void); ///< Sleep briefly
COMMON_SYSDEP void __cilkrts_yield(void); ///< Yield quantum
COMMON_SYSDEP void __cilkrts_idle(void); ///< Idle
/**
* @brief Gets environment variable 'varname' and copy its value into 'value'.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment