<br><div class="gmail_quote">2009/9/13 Ion Gaztaņaga <span dir="ltr">&lt;<a href="mailto:igaztanaga@gmail.com">igaztanaga@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Interprocess supposes that if shm_open needs path-based names(POSIX allows that), sem_open also needs them, so try to comment this line in inteprocess/detail/workaround.hpp:<br>
<br>
   #ifdef BOOST_INTERPROCESS_POSIX_NAMED_SEMAPHORES<br>
      #if defined(BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_RESOURCES)<br>
//THIS-&gt; #define BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_SEMAPHORES<br>
      #endif<br>
   #endif<br>
<br>
And let&#39;s see if simple &quot;/name&quot; names are what hpux needs for sems.<div><div class="h5"><br></div></div></blockquote><div>This solved the problem. Thank you!</div><div><br></div><div>I&#39;m glad to say that after some additional work all tests have passed.</div>

<div><br></div><div>Apart from the problem with named_mutex test, there were other tests failing: a) file_mapping_test, message_queue_test, named_condition_test, named_recursive_mutex_test and a few others, all failed with the same error: ENOMEM; b) shared_ptr_test was also failing because of an error in the call to __sync_val_compare_and_swap. </div>

<div><br></div><div>Here is what I&#39;ve done to solve these problems:</div><div><br></div><div>a) The problem was due to limitations on the default HP-UX address space model. See  <a href="http://h20338.www2.hp.com/hpux11i/downloads/aas_white_paper.pdf">http://h20338.www2.hp.com/hpux11i/downloads/aas_white_paper.pdf</a> (page 9). Based on this information I solved the problem by adding this line to file Jamfile.v2, after line 29:</div>

<div><br></div><div>&lt;host-os&gt;hpux,&lt;toolset&gt;gcc:&lt;linkflags&gt;&quot;-Wl,+as,mpas&quot;</div><div><br></div><div>b) The problem here was the wrong order of the parameters passed to method __sync_val_compare_and_swap (in detail::atomic_cas32):</div>

<div>wrong: __sync_val_compare_and_swap(const_cast&lt;boost::uint32_t *&gt;(mem), with, cmp)</div><div>correct: __sync_val_compare_and_swap(const_cast&lt;boost::uint32_t *&gt;(mem), cmp, with)</div><div><br></div><div>After these fixes, we can say boost.interprocess works fine in HP-UX with gcc44.</div>

<div><br></div><div>Thank you very much for you patience and valuable help.</div><div><br></div><div>Best regards,</div><div>Rui</div></div>

