<?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: ioctl with thread in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684513#M793889</link>
    <description>excuse me, what's the meaning of the w/o?&lt;BR /&gt;Your meaning is there are some problems in my using the first argument of the ioctl?  &lt;BR /&gt;i think there are maybe some problems with ioctl and pthread_mutex_lock? &lt;BR /&gt;the program like this:&lt;BR /&gt;for( ; ; ){&lt;BR /&gt;   pthread_mutex_lock(&amp;amp;a);&lt;BR /&gt;   while (event == NULL) {&lt;BR /&gt;     pthread_cond_wai(&amp;amp;b,&amp;amp;a);&lt;BR /&gt;   }&lt;BR /&gt;   while (p != NULL) {&lt;BR /&gt;ã  ã  ã  ioctl(fd, ...);&lt;BR /&gt;ã  ã  ã  p = p-&amp;gt;next;&lt;BR /&gt;ã  ã  }&lt;BR /&gt;   pthread_cond_timedwait(&amp;amp;b,&amp;amp;a,&amp;amp;c);&lt;BR /&gt;   pthread_mutex_unlock(&amp;amp;a);&lt;BR /&gt;}</description>
    <pubDate>Mon, 05 Dec 2005 23:07:58 GMT</pubDate>
    <dc:creator>Dboy_1</dc:creator>
    <dc:date>2005-12-05T23:07:58Z</dc:date>
    <item>
      <title>ioctl with thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684509#M793881</link>
      <description>i have a program that using ioctl(2) in a thread environment. i compiled it with -lpthread option and without error. but when i run it there are error like this:&lt;BR /&gt;"Invalid argument" &lt;BR /&gt;thrown by ioctl(2).&lt;BR /&gt;&lt;BR /&gt;what maybe is the reason?</description>
      <pubDate>Mon, 05 Dec 2005 06:12:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684509#M793881</guid>
      <dc:creator>Dboy_1</dc:creator>
      <dc:date>2005-12-05T06:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: ioctl with thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684510#M793884</link>
      <description>The reason is that you are using ioctl() incorrectly whether or not you are using threads. Every ioctl() requires at least 2 integer arguments and generally a 3rd argument which is driver/request dependent. Because ioctl() is directly related to the underlying driver, it's not possible to help much more without knowing the context of the system call.</description>
      <pubDate>Mon, 05 Dec 2005 08:53:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684510#M793884</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-12-05T08:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: ioctl with thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684511#M793885</link>
      <description>Thank you.&lt;BR /&gt;But i can run the program without multi-thread environment. so i think there are problems in multi-thread using ioctl.&lt;BR /&gt;And now i can compiled it with -lpthread option. But ioctl still return -1.</description>
      <pubDate>Mon, 05 Dec 2005 21:00:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684511#M793885</guid>
      <dc:creator>Dboy_1</dc:creator>
      <dc:date>2005-12-05T21:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: ioctl with thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684512#M793887</link>
      <description>I can absolutely assure that ioctl(2) has no meaning. The first argument is the file descriptor but w/o the remaining arguments whatever randomly happens to be in the registers or stack are used as the remaining arguments to ioctl.</description>
      <pubDate>Mon, 05 Dec 2005 21:45:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684512#M793887</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-12-05T21:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: ioctl with thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684513#M793889</link>
      <description>excuse me, what's the meaning of the w/o?&lt;BR /&gt;Your meaning is there are some problems in my using the first argument of the ioctl?  &lt;BR /&gt;i think there are maybe some problems with ioctl and pthread_mutex_lock? &lt;BR /&gt;the program like this:&lt;BR /&gt;for( ; ; ){&lt;BR /&gt;   pthread_mutex_lock(&amp;amp;a);&lt;BR /&gt;   while (event == NULL) {&lt;BR /&gt;     pthread_cond_wai(&amp;amp;b,&amp;amp;a);&lt;BR /&gt;   }&lt;BR /&gt;   while (p != NULL) {&lt;BR /&gt;ã  ã  ã  ioctl(fd, ...);&lt;BR /&gt;ã  ã  ã  p = p-&amp;gt;next;&lt;BR /&gt;ã  ã  }&lt;BR /&gt;   pthread_cond_timedwait(&amp;amp;b,&amp;amp;a,&amp;amp;c);&lt;BR /&gt;   pthread_mutex_unlock(&amp;amp;a);&lt;BR /&gt;}</description>
      <pubDate>Mon, 05 Dec 2005 23:07:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684513#M793889</guid>
      <dc:creator>Dboy_1</dc:creator>
      <dc:date>2005-12-05T23:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: ioctl with thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684514#M793890</link>
      <description>w/o = without. We are having language problems. When you said you were using ioctl(2), I took that literally in that you were calling ioctl with ONLY the first argument.&lt;BR /&gt;&lt;BR /&gt;In your last posting, whatever is before ioctl(2,...) is garbled so I cannot comment on that. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 05 Dec 2005 23:21:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684514#M793890</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-12-05T23:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: ioctl with thread</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684515#M793893</link>
      <description>Sorry. i'm meaning i use the ioctl system call.&lt;BR /&gt;for( ; ; ){&lt;BR /&gt;pthread_mutex_lock(&amp;amp;a);&lt;BR /&gt;while (event == NULL) {&lt;BR /&gt;pthread_cond_wai(&amp;amp;b,&amp;amp;a);&lt;BR /&gt;}&lt;BR /&gt;while (p != NULL) {&lt;BR /&gt;fd = socket(...);&lt;BR /&gt;ioctl(fd, ...);&lt;BR /&gt;close(fd);&lt;BR /&gt;p = p-&amp;gt;next;&lt;BR /&gt;}&lt;BR /&gt;pthread_cond_timedwait(&amp;amp;b,&amp;amp;a,&amp;amp;c);&lt;BR /&gt;pthread_mutex_unlock(&amp;amp;a);&lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;when i don't use the pthread_cond_timedwait(), there are no error.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Dec 2005 01:27:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ioctl-with-thread/m-p/3684515#M793893</guid>
      <dc:creator>Dboy_1</dc:creator>
      <dc:date>2005-12-06T01:27:58Z</dc:date>
    </item>
  </channel>
</rss>

