This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make generic atomicity.h use gthr.h mutexes


> with a documentation patch that explains what is going on, or perhaps a
> warning when configure.target finds out that the generic code path for
> atomicity.h is going to be used.

I forgot to post that part.


Index: configure.in
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/configure.in,v
retrieving revision 1.107
diff -u -3 -r1.107 configure.in
--- configure.in	18 Oct 2002 04:46:54 -0000	1.107
+++ configure.in	8 Nov 2002 20:25:16 -0000
@@ -70,6 +70,19 @@
 # Check for headers necessary for libsupc++ using dyn-string.c/cxa_demangle.c
 AC_CHECK_HEADERS(string.h stdlib.h)
 
+# No surprises, no surprises...
+if test $ATOMICITYH = cpu/generic ; then
+  AC_MSG_WARN([No native atomic operations are provided yet for this platform.])
+  if test $target_thread_file = single; then
+    AC_MSG_WARN([They cannot be faked when thread support is disabled.])
+    AC_MSG_WARN([Thread-safety of certain classes is not guaranteed.])
+  else
+    AC_MSG_WARN([They will be faked using a mutex.])
+    AC_MSG_WARN([Performance of certain classes will degrade as a result.])
+  fi
+fi
+
+
 if test -n "$with_cross_host" || test x"$build" != x"$host"; then
 
   # We are being configured with some form of cross compiler.
@@ -416,7 +429,7 @@
 
 # Propagate the target-specific source directories through the build chain.
 # (Nothing currently uses cpu_include_dir directly; only ATOMICITYH 
-# uses it, and they only get used here.)
+# uses it, and it only gets used in this file.)
 OS_INC_SRCDIR=config/${os_include_dir}
 ATOMICITY_INC_SRCDIR=config/${ATOMICITYH}
 AC_SUBST(OS_INC_SRCDIR)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]