Hello,

I have tried to compile thread_dev branch on linux, but it fails. Patch
below fixes this issue, but it is not tested.

I would also like to ask, if there is any plan to merge thread_dev branch
into the standard boost (I need thread pools, that's the reason for
question). The second question is, if there is an intention to submit
boost thread API to the C++ standard commitee as a C++ thread API
proposal...

Thanks,

Karel
--
Karel Gardas                  [EMAIL PROTECTED]
ObjectSecurity Ltd.           http://www.objectsecurity.com

Index: src/mutex.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/mutex.cpp,v
retrieving revision 1.11.4.4
diff -u -r1.11.4.4 mutex.cpp
--- src/mutex.cpp       3 Apr 2003 22:56:49 -0000       1.11.4.4
+++ src/mutex.cpp       23 Aug 2003 22:05:14 -0000
@@ -228,7 +228,8 @@
     do_unlock();
 }
 #elif defined(BOOST_HAS_PTHREADS)
-mutex::mutex()
+mutex::mutex(const char* name)
+    : boost::detail::named_object(name)
 {
     int res = 0;
     res = pthread_mutex_init(&m_mutex, 0);
@@ -268,7 +269,8 @@
     state.pmutex = &m_mutex;
 }

-try_mutex::try_mutex()
+try_mutex::try_mutex(const char* name)
+    : boost::detail::named_object(name)
 {
     int res = 0;
     res = pthread_mutex_init(&m_mutex, 0);
@@ -317,8 +319,9 @@
     state.pmutex = &m_mutex;
 }

-timed_mutex::timed_mutex()
-    : m_locked(false)
+timed_mutex::timed_mutex(const char* name)
+    : boost::detail::named_object(name),
+      m_locked(false)
 {
     int res = 0;
     res = pthread_mutex_init(&m_mutex, 0);
Index: src/shared_memory.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/Attic/shared_memory.cpp,v
retrieving revision 1.1.4.11
diff -u -r1.1.4.11 shared_memory.cpp
--- src/shared_memory.cpp       18 Mar 2003 23:30:51 -0000      1.1.4.11
+++ src/shared_memory.cpp       23 Aug 2003 22:05:14 -0000
@@ -131,7 +131,7 @@
        int cflag = (flags & create) ? O_CREAT|O_TRUNC|O_EXCL : 0;
        for (;;)
        {
-               m_hmap = shm_open(m_name.c_str(), oflag|cflag, 0);
+               m_hmap = shm_open(this->name(), oflag|cflag, 0);
                if (m_hmap == -1)
                {
                        if (errno != EEXIST || (flags & exclusive))
@@ -144,7 +144,7 @@
                                assert(res);
                                throw thread_resource_error();
                        }
-                       m_hmap = shm_open(m_name.c_str(), oflag, 0);
+                       m_hmap = shm_open(this->name(), oflag, 0);
                        if (m_hmap == -1)
                        {
                                if (errno == ENOENT)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to