<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/</id><updated>2020-02-27T13:52:39.725000Z</updated><subtitle>Recent posts to Semaphores on Linux target</subtitle><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#4c13" rel="alternate"/><published>2020-02-27T13:52:39.725000Z</published><updated>2020-02-27T13:52:39.725000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com2d6c5ca0dcce4790c293d3785099e96daa2eb9a3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I don't understand exactly what you mean:&lt;br/&gt;
- If you want to buy an existing controller which can be programmed with CoDeSys you can go to the CoDeSys Device Directory and search &lt;a class="" href="http://www.3s-software.com/index.shtml?CoDeSys_device_directory" rel="nofollow"&gt;http://www.3s-software.com/index.shtml? ... _directory&lt;/a&gt;&lt;br/&gt;
- If you want to build your own controller you could choose any platform. See &lt;a class="" href="http://www.3s-software.com/index.shtml?en_CoDeSysSP_OEM" rel="nofollow"&gt;http://www.3s-software.com/index.shtml?en_CoDeSysSP_OEM&lt;/a&gt; (click on Linux) to see the details and requirements.&lt;br/&gt;
I cannot advise you which platform is best.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#1930" rel="alternate"/><published>2020-02-27T13:52:39.568000Z</published><updated>2020-02-27T13:52:39.568000Z</updated><author><name>sarathbabu</name><uri>https://forge.codesys.com/u/sarathbabu/</uri></author><id>https://forge.codesys.com23d4ce0daacdfefb4b3afca726affe05f9f9337b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the info.Can I you give me a link for any existing embedded controller using codesys.It will be helpful for me.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#8911" rel="alternate"/><published>2020-02-27T13:52:39.409000Z</published><updated>2020-02-27T13:52:39.409000Z</updated><author><name>timvh</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com3590b42f8719d1a6070e24393fa167ca220d6460</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;To use CoDeSys on your own embedded controller, you will need the CoDeSys Runtime Toolkit.&lt;br/&gt;
Together with 3S-Smart Software Solutions you can then implement and adapt the runtime to your hardware.&lt;br/&gt;
Please contact the sales team of 3S-Smart Software Solutions for further information.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#99da" rel="alternate"/><published>2020-02-27T13:52:39.235000Z</published><updated>2020-02-27T13:52:39.235000Z</updated><author><name>sarathbabu</name><uri>https://forge.codesys.com/u/sarathbabu/</uri></author><id>https://forge.codesys.comfce738e592f2f7a9bfb4e25245a0a50b421bb3d5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;  &lt;span class="nv"&gt;I&lt;/span&gt; &lt;span class="nv"&gt;would&lt;/span&gt; &lt;span class="nv"&gt;like&lt;/span&gt; &lt;span class="nv"&gt;to&lt;/span&gt; &lt;span class="nv"&gt;know&lt;/span&gt; &lt;span class="nv"&gt;whether&lt;/span&gt; &lt;span class="nv"&gt;codesys&lt;/span&gt; &lt;span class="nv"&gt;can&lt;/span&gt; &lt;span class="nv"&gt;be&lt;/span&gt; &lt;span class="nv"&gt;used&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;programming&lt;/span&gt; &lt;span class="nv"&gt;embedded&lt;/span&gt; &lt;span class="nv"&gt;controllers&lt;/span&gt; &lt;span class="nv"&gt;and&lt;/span&gt; &lt;span class="nv"&gt;can&lt;/span&gt; &lt;span class="nv"&gt;I&lt;/span&gt; &lt;span class="nv"&gt;know&lt;/span&gt; &lt;span class="nv"&gt;one&lt;/span&gt; &lt;span class="nv"&gt;example&lt;/span&gt; &lt;span class="nv"&gt;how&lt;/span&gt; &lt;span class="nv"&gt;it&lt;/span&gt; &lt;span class="nv"&gt;is&lt;/span&gt; &lt;span class="nv"&gt;done&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="nv"&gt;this&lt;/span&gt; &lt;span class="nv"&gt;linux&lt;/span&gt; &lt;span class="nv"&gt;and&lt;/span&gt; &lt;span class="nv"&gt;one&lt;/span&gt; &lt;span class="nv"&gt;embedded&lt;/span&gt; &lt;span class="nv"&gt;application&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#e703" rel="alternate"/><published>2020-02-27T13:52:39.065000Z</published><updated>2020-02-27T13:52:39.065000Z</updated><author><name>francois</name><uri>https://forge.codesys.com/u/francois/</uri></author><id>https://forge.codesys.comd9f4b95ba8e27094f239de6c36515c56c5b98cd3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Interesting point, I am running linux-davinci, which support POSIX sems.&lt;br/&gt;
I compiled a small c application that uses semaphores.h and sem_init, wait, post, destroy to test on the target and it runs smoothly, so I gess I'll have to upgrade my runtime to make it works.&lt;/p&gt;
&lt;p&gt;Anyway, thanks for your help!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#f61e" rel="alternate"/><published>2020-02-27T13:52:38.498000Z</published><updated>2020-02-27T13:52:38.498000Z</updated><author><name>Jay</name><uri>https://forge.codesys.com/u/jay/</uri></author><id>https://forge.codesys.comc359ff359c05b54be45aaf2bb45e1f43610bc928</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Which Linux distro are you using? I noticed that Codesys (V. 3.4.x.x) Semaphores work if your Linux supports POSIX IPC Semaphores, but not with System V semaphores. Your Linux distro should support POSIX if you can find /dev/shm directory.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#ebab" rel="alternate"/><published>2020-02-27T13:52:38.303000Z</published><updated>2020-02-27T13:52:38.303000Z</updated><author><name>kberlin</name><uri>https://forge.codesys.com/u/kberlin/</uri></author><id>https://forge.codesys.com4388427f775a3c4d0631109458ae54f159f93c6b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;There is an old bug report &lt;a class="" href="http://jira.3s-software.com/browse/CDS-7499" rel="nofollow"&gt;CDS-7499&lt;/a&gt; that just says "Linux: Semaphores are not working correctly". But I think it would be best if you contacted 3S support directly.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Kristian Berlin&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Semaphores on Linux target</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/fbd9aebdfe/?limit=25#2f4a" rel="alternate"/><published>2020-02-27T13:52:38.040000Z</published><updated>2020-02-27T13:52:38.040000Z</updated><author><name>francois</name><uri>https://forge.codesys.com/u/francois/</uri></author><id>https://forge.codesys.come05461ecfe3e26e122f8798200fb4966f9a6d874</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I need a way to use sems on my V3.4.2.0 arm-linux target.&lt;br/&gt;
Using SysSemProcess lib makes segmentation fault when attempting to start the runtime, I think the lib might not be implemented on Linux in my current runtime version.&lt;/p&gt;
&lt;p&gt;Using SysSem, SysSemEnter or SysSemTry always return ERR_OK, no matter if the sem is locked or not!&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="k"&gt;IF&lt;/span&gt; &lt;span class="nv"&gt;pSemHandle&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;RTS_INVALID_HANDLE&lt;/span&gt; &lt;span class="k"&gt;THEN&lt;/span&gt;
   &lt;span class="nv"&gt;pSemHandle&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt; :&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;SysSemCreate&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;ADR&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;semCreateResult&lt;/span&gt;&lt;span class="ss"&gt;))&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;END_IF&lt;/span&gt;
&lt;span class="nv"&gt;semTryResult&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;SysSemTry&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pSemHandle&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;span class="nv"&gt;semEnterResult&lt;/span&gt;:&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;SysSemEnter&lt;/span&gt;&lt;span class="ss"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pSemHandle&lt;/span&gt;&lt;span class="o"&gt;^&lt;/span&gt;&lt;span class="ss"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;pSemHandle is a pointer to a udint declared in a GVL.&lt;br/&gt;
Obviously I have more code that later releases the sem when not needed anymore, but my problem is that I cannot check if the resource is free or not!&lt;/p&gt;
&lt;p&gt;I dont what to use SW FB for that because I want to make sure that the P and V functions will be "atomic".&lt;/p&gt;
&lt;p&gt;Anyone had any luck with this lib on an arm-linux target?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>