<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: pthreads_tr linking problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/pthreads-tr-linking-problem/m-p/2683384#M723264</link>
    <description>I've never used pthread_once, but my advise is to be careful that you are initialising the once_control object correctly:&lt;BR /&gt;&lt;BR /&gt;static pthread_once_t  once_control = PTHREAD_ONCE_INIT; &lt;BR /&gt; extern void initialize(); &lt;BR /&gt;  &lt;BR /&gt; (void)pthread_once(&amp;amp;once_control, initialize); &lt;BR /&gt;&lt;BR /&gt;Make sure multiple threads aren't using different once_control objects, and that they aren't re-initialising the same object before calling pthread_once.  Ideally initialise the once_object before creating any threads.&lt;BR /&gt;&lt;BR /&gt;Migrating to kernel threads will always expose those race conditions that you never knew you had :)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
    <pubDate>Thu, 14 Mar 2002 16:57:02 GMT</pubDate>
    <dc:creator>Steven Gillard_2</dc:creator>
    <dc:date>2002-03-14T16:57:02Z</dc:date>
    <item>
      <title>pthreads_tr linking problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pthreads-tr-linking-problem/m-p/2683383#M723263</link>
      <description>We are porting a dce application to kernel threads.  Funny thing:  the code behaves when we link to libpthread_tr.sl; it does not behave when we link to libpthread.sl.  More specifically, it will not call the function specified in pthread_once (the first pthread call).  Anyone experience anything similar and or have some advice?</description>
      <pubDate>Thu, 14 Mar 2002 16:32:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pthreads-tr-linking-problem/m-p/2683383#M723263</guid>
      <dc:creator>Courtney Brown_1</dc:creator>
      <dc:date>2002-03-14T16:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: pthreads_tr linking problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pthreads-tr-linking-problem/m-p/2683384#M723264</link>
      <description>I've never used pthread_once, but my advise is to be careful that you are initialising the once_control object correctly:&lt;BR /&gt;&lt;BR /&gt;static pthread_once_t  once_control = PTHREAD_ONCE_INIT; &lt;BR /&gt; extern void initialize(); &lt;BR /&gt;  &lt;BR /&gt; (void)pthread_once(&amp;amp;once_control, initialize); &lt;BR /&gt;&lt;BR /&gt;Make sure multiple threads aren't using different once_control objects, and that they aren't re-initialising the same object before calling pthread_once.  Ideally initialise the once_object before creating any threads.&lt;BR /&gt;&lt;BR /&gt;Migrating to kernel threads will always expose those race conditions that you never knew you had :)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 14 Mar 2002 16:57:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pthreads-tr-linking-problem/m-p/2683384#M723264</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2002-03-14T16:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: pthreads_tr linking problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pthreads-tr-linking-problem/m-p/2683385#M723265</link>
      <description>Thank you for the input Steve.  I double-checked everything you recommended in your reply and still have the same results.  The pthread_once function returns properly, but it does not cause the referenced function to be executed.  &lt;BR /&gt;&lt;BR /&gt;I am still confused by the program executing when the tracing version of the pthread library(libpthread_tr) is linked in and not executing with the normal version linked in.  I suspect, but have not confirmed yet, that this problem is not restricted to the pthread_once call.  It just happens to be the first pthread call made by our program.</description>
      <pubDate>Fri, 15 Mar 2002 13:59:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pthreads-tr-linking-problem/m-p/2683385#M723265</guid>
      <dc:creator>Courtney Brown_1</dc:creator>
      <dc:date>2002-03-15T13:59:21Z</dc:date>
    </item>
  </channel>
</rss>

