Commit 74cb8972 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Add an option to disable the use of atomic operations within the tasks and...

Add an option to disable the use of atomic operations within the tasks and return to the old behaviour. By default atomic operations are allowed in tasks
parent c83f6d0c
......@@ -239,6 +239,23 @@ if test "x$enable_debug" = "xyes"; then
fi
fi
# Are we using the regular tasks (with atomics and no task conflicts) or
# are we using the atomic-free task-conflicting (slower) version?
AC_ARG_ENABLE([atomics-within-tasks],
[AS_HELP_STRING([--disable-atomics-within-tasks],
[Disable the use of atomic operations within tasks. This creates more task conflicts
but allows for atomic-free and lock-free code within the tasks. This likely slows down
the code @<:@yes/no@:>@]
)],
[enable_atomics_within_tasks="$enableval"],
[enable_atomics_within_tasks="yes"]
)
AS_IF([test "x$enable_atomics_within_tasks" != "xno"],
, # Note: atomics are allowed by default, we define the macro if we don't want them.
[AC_DEFINE([SWIFT_TASKS_WITHOUT_ATOMICS],1,[Makes SWIFT use atomic-free and lock-free tasks.])
])
# Check if task debugging is on.
AC_ARG_ENABLE([task-debugging],
[AS_HELP_STRING([--enable-task-debugging],
......@@ -2301,6 +2318,7 @@ AC_MSG_RESULT([
Black holes model : $with_black_holes
Task dependencies : $with_task_order
Atomic operations in tasks : $enable_atomics_within_tasks
Individual timers : $enable_timers
Task debugging : $enable_task_debugging
Threadpool debugging : $enable_threadpool_debugging
......
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