<?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: semop not working in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715008#M660179</link>
    <description>&amp;gt;Thanks for the solution Dennis.&lt;BR /&gt;&lt;BR /&gt;If you are happy with the answers you have gotten, please read the following about how to assign points:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
    <pubDate>Sun, 21 Nov 2010 08:38:06 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2010-11-21T08:38:06Z</dc:date>
    <item>
      <title>semop not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715003#M660174</link>
      <description>We were having a semaphore locking implementation to lock semaphore before accessing the shared memory .When this implementation is ported to HP Ux from Digital.&lt;BR /&gt;&lt;BR /&gt;When the code is ported to HP UX, the application is hanging at semop function.&lt;BR /&gt;&lt;BR /&gt; sem_buf.sem_num = 0;&lt;BR /&gt; sem_buf.sem_op  = LOCK; /* LOCK = -1*/&lt;BR /&gt; sem_buf.sem_flg = SEM_UNDO;&lt;BR /&gt;&lt;BR /&gt;      /*&lt;BR /&gt;      ** lock&lt;BR /&gt;      */&lt;BR /&gt;      if ( semop(shms.sem_id, &amp;amp;sem_buf, 1) ) {&lt;BR /&gt;              rc = IPC_ERROR_EXIT;&lt;BR /&gt;      }&lt;BR /&gt;&lt;BR /&gt;Is there any change in HP UX for semop&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Nov 2010 10:23:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715003#M660174</guid>
      <dc:creator>anup1890</dc:creator>
      <dc:date>2010-11-18T10:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: semop not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715004#M660175</link>
      <description>Do know what the value of semval is?&lt;BR /&gt;How are you calling semctl(2)?  Are you in 64 bit mode?</description>
      <pubDate>Fri, 19 Nov 2010 12:52:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715004#M660175</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-19T12:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: semop not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715005#M660176</link>
      <description>Hi,&lt;BR /&gt;     Thanks for the response,&lt;BR /&gt;&lt;BR /&gt;  Yes, I am compiling in 64bit mode.&lt;BR /&gt;&lt;BR /&gt;Creation of semaphore is done like this&lt;BR /&gt; semctl(*sem_id, 0, SETVAL, 1)&lt;BR /&gt;&lt;BR /&gt;Once before calling semop I used "semctl(sem_id, 0, GETVAL, 0);" to get semaphore value&lt;BR /&gt;it returned me 0. So this means semaphore value is 0.&lt;BR /&gt;&lt;BR /&gt;One more thing i noted is when i used IPC_NOWAIT for sem_flg the hanging issue was not there&lt;BR /&gt;Is it correct to use IPC_NOWAIT instead of SEM_UNDO. Or am i doing something functionally wrong due to which this problem is comming &lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;</description>
      <pubDate>Sat, 20 Nov 2010 08:38:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715005#M660176</guid>
      <dc:creator>anup1890</dc:creator>
      <dc:date>2010-11-20T08:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: semop not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715006#M660177</link>
      <description>&amp;gt;semctl(*sem_id, 0, SETVAL, 1)&lt;BR /&gt;&lt;BR /&gt;As I suspected on the 4th parm, that's your problem, this is illegal:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1137658" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1137658&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1385188" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1385188&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=472388" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=472388&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=631198" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=631198&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=847096" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=847096&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1116632" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1116632&lt;/A&gt;</description>
      <pubDate>Sat, 20 Nov 2010 10:50:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715006#M660177</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-20T10:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: semop not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715007#M660178</link>
      <description>It worked!!&lt;BR /&gt;&lt;BR /&gt;Thanks for the solution Dennis.</description>
      <pubDate>Sat, 20 Nov 2010 13:09:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715007#M660178</guid>
      <dc:creator>anup1890</dc:creator>
      <dc:date>2010-11-20T13:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: semop not working</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715008#M660179</link>
      <description>&amp;gt;Thanks for the solution Dennis.&lt;BR /&gt;&lt;BR /&gt;If you are happy with the answers you have gotten, please read the following about how to assign points:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
      <pubDate>Sun, 21 Nov 2010 08:38:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/semop-not-working/m-p/4715008#M660179</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-21T08:38:06Z</dc:date>
    </item>
  </channel>
</rss>

