Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76557 - trunk/boost/thread/pthread
From: vicente.botet_at_[hidden]
Date: 2012-01-17 13:28:46


Author: viboes
Date: 2012-01-17 13:28:46 EST (Tue, 17 Jan 2012)
New Revision: 76557
URL: http://svn.boost.org/trac/boost/changeset/76557

Log:
Thread: Try to fix #6419 - Error: PTHREAD_STACK_MIN is not always defined when PTHREADS are used
Text files modified:
   trunk/boost/thread/pthread/thread_data.hpp | 2 ++
   1 files changed, 2 insertions(+), 0 deletions(-)

Modified: trunk/boost/thread/pthread/thread_data.hpp
==============================================================================
--- trunk/boost/thread/pthread/thread_data.hpp (original)
+++ trunk/boost/thread/pthread/thread_data.hpp 2012-01-17 13:28:46 EST (Tue, 17 Jan 2012)
@@ -35,7 +35,9 @@
         void set_stack_size(std::size_t size) {
           if (size==0) return;
           std::size_t page_size = getpagesize();
+#ifdef PTHREAD_STACK_MIN
           if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
+#endif
           size = ((size+page_size-1)/page_size)*page_size;
           int res = pthread_attr_setstacksize(&val_, size);
           BOOST_VERIFY(!res && "pthread_attr_setstacksize failed");


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk