<?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: gethostbyaddr &amp;amp; multi-thread in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552378#M837628</link>
    <description>Thanks for all the information.&lt;BR /&gt;&lt;BR /&gt;Steve, if all libc functions are thread safe then why I see in page&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3921-90010/thread_safety.5.html" target="_blank"&gt;http://docs.hp.com/en/B3921-90010/thread_safety.5.html&lt;/A&gt; there are still functions which are not thread-safe?&lt;BR /&gt;&lt;BR /&gt;For example, setmntent is classfied in "Interfaces That Are Not thread-safe" category. I am quite concerned about this because I am using setmntent, getmntent and endmntent.</description>
    <pubDate>Fri, 03 Jun 2005 13:25:03 GMT</pubDate>
    <dc:creator>Michelle_61</dc:creator>
    <dc:date>2005-06-03T13:25:03Z</dc:date>
    <item>
      <title>gethostbyaddr &amp; multi-thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552374#M837624</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I want to know if gethostbyaddr (HPUX 11) is thread safe. If not, are there any other functions I can use?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Thu, 26 May 2005 07:48:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552374#M837624</guid>
      <dc:creator>Michelle_61</dc:creator>
      <dc:date>2005-05-26T07:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: gethostbyaddr &amp; multi-thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552375#M837625</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;libc threads -- Which calls are thread safe?  Which are not?&lt;BR /&gt;&lt;BR /&gt;RESOLUTION TEXT&lt;BR /&gt;&lt;BR /&gt;Starting at 10.0, libc functions are safe for use in multi-threaded&lt;BR /&gt;applications.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thus no problem&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;                 Steve Steel</description>
      <pubDate>Thu, 26 May 2005 08:03:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552375#M837625</guid>
      <dc:creator>Steve Steel</dc:creator>
      <dc:date>2005-05-26T08:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: gethostbyaddr &amp; multi-thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552376#M837626</link>
      <description>Looking at the manpage, it's thread safe but you have to take a little care with how you handle it: -&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;In a multithreaded application, gethostent(), gethostbyaddr(), and gethostbyname() use thread-specific storage that is re-used in each call. The return value, struct hostent, should be unique for each thread and should be saved, if desired, before the thread makes the next gethost*() call.&lt;BR /&gt;&lt;BR /&gt;For enumeration in multithreaded applications, the position within the enumeration is a process-wide property shared by all threads. sethostent() may be used in a multithreaded application, but resets the enumeration position for all threads. If multiple threads interleave calls to gethostent(), the threads will enumerate disjoint subsets of the host database.&lt;BR /&gt;&lt;BR /&gt;---</description>
      <pubDate>Thu, 26 May 2005 08:30:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552376#M837626</guid>
      <dc:creator>Simon Hargrave</dc:creator>
      <dc:date>2005-05-26T08:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: gethostbyaddr &amp; multi-thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552377#M837627</link>
      <description>If you are targetting HP-UX 11i (11.11) and later, you may want to use getnameinfo() and friends (getaddrinfo) instead since those are the routines that work for both IPv4 and IPv6.&lt;BR /&gt;&lt;BR /&gt;There are also small open-source bits out there that will allow you to use those routines on 11.00 or other platforms without a native getaddrinfo() call.  I use one in the 2.4.0 version of netperf - &lt;A href="http://www.netperf.org/" target="_blank"&gt;http://www.netperf.org/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I suspect the native getnodeinfo on 11.11 and later is thread-safe.  I'm not sure if the package I use to emulate those for 11.0 is or not.</description>
      <pubDate>Fri, 27 May 2005 11:28:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552377#M837627</guid>
      <dc:creator>rick jones</dc:creator>
      <dc:date>2005-05-27T11:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: gethostbyaddr &amp; multi-thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552378#M837628</link>
      <description>Thanks for all the information.&lt;BR /&gt;&lt;BR /&gt;Steve, if all libc functions are thread safe then why I see in page&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B3921-90010/thread_safety.5.html" target="_blank"&gt;http://docs.hp.com/en/B3921-90010/thread_safety.5.html&lt;/A&gt; there are still functions which are not thread-safe?&lt;BR /&gt;&lt;BR /&gt;For example, setmntent is classfied in "Interfaces That Are Not thread-safe" category. I am quite concerned about this because I am using setmntent, getmntent and endmntent.</description>
      <pubDate>Fri, 03 Jun 2005 13:25:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/gethostbyaddr-amp-multi-thread/m-p/3552378#M837628</guid>
      <dc:creator>Michelle_61</dc:creator>
      <dc:date>2005-06-03T13:25:03Z</dc:date>
    </item>
  </channel>
</rss>

