Commit f833164d authored by David Goodell's avatar David Goodell
Browse files

[svn-r6753] Predefined object refcounting is now controllable by a configure option.

A partial merge of r5954 from the bg-threads-1.1 branch.

No reviewer.
parent 3ab4653d
......@@ -520,6 +520,13 @@ AC_ARG_ENABLE(handle-allocation,
locking. 'mutex' is the default.]
,, enable_handle_allocation=default)
AC_ARG_ENABLE([predefined-refcount],
[AS_HELP_STRING([--enable-predefined-refcount],
[control whether predefined objects like MPI_COMM_WORLD are
reference counted (default depends on --enable-thread-cs choice)])],
[],
[enable_predefined_refcount=default])
dnl
dnl
AC_ARG_ENABLE(weak-symbols,
......@@ -1125,6 +1132,7 @@ if test "$enable_threads" = "multiple" ; then
lock-free|lock_free|lockfree)
thread_granularity=MPIU_THREAD_GRANULARITY_LOCK_FREE
if test "$enable_refcount" = "default" ; then enable_refcount=lock-free ; fi
if test "$enable_predefined_refcount" = "default" ; then enable_predefined_refcount=no ; fi
;;
*)
AC_MSG_ERROR([Unrecognized value $enable_thread_cs for --enable-thread-cs])
......@@ -1137,7 +1145,6 @@ if test "$enable_threads" = "multiple" ; then
;;
lock-free|lock_free|lockfree)
thread_refcount=MPIU_REFCOUNT_LOCKFREE
AC_DEFINE([MPIU_THREAD_SUPPRESS_PREDEFINED_REFCOUNTS],[1],[define to disable reference counting predefined objects like MPI_COMM_WORLD])
;;
none)
thread_refcount=MPIU_REFCOUNT_NONE
......@@ -1149,6 +1156,10 @@ if test "$enable_threads" = "multiple" ; then
fi
AC_DEFINE_UNQUOTED([MPIU_THREAD_GRANULARITY],$thread_granularity,[Method used to implement atomic updates and access])
if test "$enable_predefined_refcount" = "no" ; then
AC_DEFINE([MPIU_THREAD_SUPPRESS_PREDEFINED_REFCOUNTS],[1],[define to disable reference counting predefined objects like MPI_COMM_WORLD])
fi
case $enable_handle_allocation in
mutex|default)
handle_allocation_method=MPIU_HANDLE_ALLOCATION_MUTEX
......
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