<?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 SmartDSP OS Mutexes and spinlocks in Other NXP Products</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/SmartDSP-OS-Mutexes-and-spinlocks/m-p/161473#M848</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need to implement mutual exclusion and I quickly found out the EWL c/c++ mutexes are not implemented for the Starcores, and so I turned to the spinlock of the SmartDSP OS; however, it appears the spinlock is only for mutual exclusion of a shared resources amongst cores:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Spinlocks should be used only when data is shared between cores." - from the SmartDSP_OS_User_Guide.pdf, 14 June 2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need mutual exclusion of a resource shared between tasks and ISRs on the same core in this case.&amp;nbsp; So far I haven't seen anything to do this.&amp;nbsp; I'm thinking I will make my own mutex using the bmtset intrinsic or the bmtset.w assembly instruction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comments/suggestions?&amp;nbsp; Am I missing something/making it harder than it needs to be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;zpyatt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh yeah the setup is: CodeWarrior 10.1.5, MSC8144, SmartDSP OS, using C++&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 May 2012 06:11:07 GMT</pubDate>
    <dc:creator>zpyatt</dc:creator>
    <dc:date>2012-05-10T06:11:07Z</dc:date>
    <item>
      <title>SmartDSP OS Mutexes and spinlocks</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/SmartDSP-OS-Mutexes-and-spinlocks/m-p/161473#M848</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I need to implement mutual exclusion and I quickly found out the EWL c/c++ mutexes are not implemented for the Starcores, and so I turned to the spinlock of the SmartDSP OS; however, it appears the spinlock is only for mutual exclusion of a shared resources amongst cores:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Spinlocks should be used only when data is shared between cores." - from the SmartDSP_OS_User_Guide.pdf, 14 June 2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need mutual exclusion of a resource shared between tasks and ISRs on the same core in this case.&amp;nbsp; So far I haven't seen anything to do this.&amp;nbsp; I'm thinking I will make my own mutex using the bmtset intrinsic or the bmtset.w assembly instruction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comments/suggestions?&amp;nbsp; Am I missing something/making it harder than it needs to be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;zpyatt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh yeah the setup is: CodeWarrior 10.1.5, MSC8144, SmartDSP OS, using C++&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 06:11:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/SmartDSP-OS-Mutexes-and-spinlocks/m-p/161473#M848</guid>
      <dc:creator>zpyatt</dc:creator>
      <dc:date>2012-05-10T06:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: SmartDSP OS Mutexes and spinlocks</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/SmartDSP-OS-Mutexes-and-spinlocks/m-p/161474#M849</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mutexes are binaries semaphores, you can use a semaphore initialized to 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jun 2012 18:31:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/SmartDSP-OS-Mutexes-and-spinlocks/m-p/161474#M849</guid>
      <dc:creator>Mick92</dc:creator>
      <dc:date>2012-06-27T18:31:14Z</dc:date>
    </item>
  </channel>
</rss>

