<?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 Asynchronous I/O library in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/asynchronous-i-o-library/m-p/2963117#M720309</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am receiving the following message when trying to link&lt;BR /&gt;a program containing calls&lt;BR /&gt;to asynchronous I/O operations on HP-UX 11.0&lt;BR /&gt;&lt;BR /&gt;# /usr/bin/cc  wr.c&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   aio_write (first referenced in wr.o) (code)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Where on HP-UX is the async I/O library? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here's a piece of my code :&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;AIO.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;#include &lt;ERRNO.H&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#define FILESZ ( 1024 * 1024 *64 )&lt;BR /&gt;main(){&lt;BR /&gt;        struct  aiocb aio;&lt;BR /&gt;        void    *buf;&lt;BR /&gt;        time_t  time1, time2;&lt;BR /&gt;        int     err,cnt =2;&lt;BR /&gt;&lt;BR /&gt;        buf = ( void * )malloc(FILESZ);&lt;BR /&gt;        aio.aio_fildes=open("/tmp/file",O_WRONLY);&lt;BR /&gt;        aio.aio_buf = buf;&lt;BR /&gt;        aio.aio_offset=0;&lt;BR /&gt;        aio.aio_nbytes=FILESZ;&lt;BR /&gt;        aio.aio_reqprio=0;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;        time(&amp;amp;time1);&lt;BR /&gt;        err = aio_write(&amp;amp;aio);&lt;BR /&gt;        while (( err = aio_error(&amp;amp;aio)) == EINPROGRESS){&lt;BR /&gt;                sleep(1);&lt;BR /&gt;        }&lt;BR /&gt;        time(&amp;amp;time2);&lt;BR /&gt;        printf("The I/O took %d seconds\n", time2-time1 );&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for any pointers.&lt;BR /&gt;&lt;BR /&gt;Dimitry.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/ERRNO.H&gt;&lt;/TIME.H&gt;&lt;/AIO.H&gt;</description>
    <pubDate>Wed, 30 Apr 2003 17:13:22 GMT</pubDate>
    <dc:creator>Dimitry Snezhkov</dc:creator>
    <dc:date>2003-04-30T17:13:22Z</dc:date>
    <item>
      <title>Asynchronous I/O library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/asynchronous-i-o-library/m-p/2963117#M720309</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am receiving the following message when trying to link&lt;BR /&gt;a program containing calls&lt;BR /&gt;to asynchronous I/O operations on HP-UX 11.0&lt;BR /&gt;&lt;BR /&gt;# /usr/bin/cc  wr.c&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   aio_write (first referenced in wr.o) (code)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Where on HP-UX is the async I/O library? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here's a piece of my code :&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;AIO.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;#include &lt;ERRNO.H&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#define FILESZ ( 1024 * 1024 *64 )&lt;BR /&gt;main(){&lt;BR /&gt;        struct  aiocb aio;&lt;BR /&gt;        void    *buf;&lt;BR /&gt;        time_t  time1, time2;&lt;BR /&gt;        int     err,cnt =2;&lt;BR /&gt;&lt;BR /&gt;        buf = ( void * )malloc(FILESZ);&lt;BR /&gt;        aio.aio_fildes=open("/tmp/file",O_WRONLY);&lt;BR /&gt;        aio.aio_buf = buf;&lt;BR /&gt;        aio.aio_offset=0;&lt;BR /&gt;        aio.aio_nbytes=FILESZ;&lt;BR /&gt;        aio.aio_reqprio=0;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;        time(&amp;amp;time1);&lt;BR /&gt;        err = aio_write(&amp;amp;aio);&lt;BR /&gt;        while (( err = aio_error(&amp;amp;aio)) == EINPROGRESS){&lt;BR /&gt;                sleep(1);&lt;BR /&gt;        }&lt;BR /&gt;        time(&amp;amp;time2);&lt;BR /&gt;        printf("The I/O took %d seconds\n", time2-time1 );&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for any pointers.&lt;BR /&gt;&lt;BR /&gt;Dimitry.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/ERRNO.H&gt;&lt;/TIME.H&gt;&lt;/AIO.H&gt;</description>
      <pubDate>Wed, 30 Apr 2003 17:13:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/asynchronous-i-o-library/m-p/2963117#M720309</guid>
      <dc:creator>Dimitry Snezhkov</dc:creator>
      <dc:date>2003-04-30T17:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Asynchronous I/O library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/asynchronous-i-o-library/m-p/2963118#M720310</link>
      <description>from the man page&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;aio_write(2)                                                   aio_write(2)&lt;BR /&gt;&lt;BR /&gt;      To use this function, link in the realtime library by specifying -lrt&lt;BR /&gt;      on the compiler or linker command line.&lt;BR /&gt;&lt;BR /&gt;&lt;/SNIP&gt;&lt;BR /&gt;&lt;BR /&gt;Just end with -lrt when linking.  This will do.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Umapathy&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Apr 2003 17:19:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/asynchronous-i-o-library/m-p/2963118#M720310</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-04-30T17:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Asynchronous I/O library</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/asynchronous-i-o-library/m-p/2963119#M720311</link>
      <description>Fixed. &lt;BR /&gt;&lt;BR /&gt;thanks a lot</description>
      <pubDate>Wed, 30 Apr 2003 17:33:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/asynchronous-i-o-library/m-p/2963119#M720311</guid>
      <dc:creator>Dimitry Snezhkov</dc:creator>
      <dc:date>2003-04-30T17:33:33Z</dc:date>
    </item>
  </channel>
</rss>

