<?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 About my SemaCondvar and SemaMonitor in Intel® Moderncode for Parallel Architectures</title>
    <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-my-SemaCondvar-and-SemaMonitor/m-p/1071647#M6994</link>
    <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	I feel that i must explain to you how do work my inventions&amp;nbsp;that are my SemaCondvar and SemaMonitor objects, you will&amp;nbsp;find those classes inside the SemaCondvar.pas file inside&amp;nbsp;the zip file, SemaCondvar and SemaMonitor are new and portable synchronization objects , SemaCondvar combines all the charateristics of a semaphore and a condition variable and SemaMonitor combines all charateristics of a semaphore and an eventcount , they only use an event object and a very fast and efficient and portable FIFO fair Lock , so they are fast and they are FIFO fair.&lt;BR /&gt;
	&lt;BR /&gt;
	When you set the first parameter of the constructor to true&amp;nbsp;it will add the characteristic of a Semaphore to the condition&amp;nbsp;variable or to the Eventcount, so the signal will not be lost&amp;nbsp;if the threads are not waiting for the SemaCondvar or SemaMonitor object, but when you set the first parameter of the constructor&amp;nbsp;to false it will not behave like a Semaphore because if the threads are not waiting for the SemaCondvar or SemaMonitor the signal will be lost..&lt;BR /&gt;
	&lt;BR /&gt;
	Now you can pass the SemaCondvar's or Semamonitor's initialcount and SemaCondvar's or SemaMonitor's MaximumCount to the construtor, it's like the windows Semaphore`s InitialCount and the Semaphore's MaximumCount.&lt;BR /&gt;
	&lt;BR /&gt;
	Like this:&lt;BR /&gt;
	&lt;BR /&gt;
	t:=TSemaMonitor.create(true,0,4);&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	You have 5 options in the defines.inc file for setting the kind of locks, just look inside defines.inc , if you want to set it for the Mutex that is energy efficient because it blocks the threads,uncomment the option Mutex, if you want to set it for my node based scalable Lock, uncomment the option MLock, if you want to set it for my scalable array based lock called AMLock just uncomment the option AMLock inside defines.inc, if you want to set it for Ticket Spinlock just uncomment the option TicketSpinlock ,If you want to set it for Spinlock just uncomment the option Spinlock.&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	That's all.&lt;BR /&gt;
	&lt;BR /&gt;
	You can download my SemaMonitor and SemaCondvar from:&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;A href="https://sites.google.com/site/aminer68/light-weight-semacondvar-semamonitor"&gt;https://sites.google.com/site/aminer68/light-weight-semacondvar-semamonitor&lt;/A&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	and from:&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;A href="https://sites.google.com/site/aminer68/semacondvar-semamonitor"&gt;https://sites.google.com/site/aminer68/semacondvar-semamonitor&lt;/A&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Feel free to port my SemaCondvar and SemaMonitor to other programming languages !&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	Thank you,&lt;BR /&gt;
	Amine Moulay Ramdane.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2015 17:39:40 GMT</pubDate>
    <dc:creator>aminer10</dc:creator>
    <dc:date>2015-11-17T17:39:40Z</dc:date>
    <item>
      <title>About my SemaCondvar and SemaMonitor</title>
      <link>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-my-SemaCondvar-and-SemaMonitor/m-p/1071647#M6994</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	I feel that i must explain to you how do work my inventions&amp;nbsp;that are my SemaCondvar and SemaMonitor objects, you will&amp;nbsp;find those classes inside the SemaCondvar.pas file inside&amp;nbsp;the zip file, SemaCondvar and SemaMonitor are new and portable synchronization objects , SemaCondvar combines all the charateristics of a semaphore and a condition variable and SemaMonitor combines all charateristics of a semaphore and an eventcount , they only use an event object and a very fast and efficient and portable FIFO fair Lock , so they are fast and they are FIFO fair.&lt;BR /&gt;
	&lt;BR /&gt;
	When you set the first parameter of the constructor to true&amp;nbsp;it will add the characteristic of a Semaphore to the condition&amp;nbsp;variable or to the Eventcount, so the signal will not be lost&amp;nbsp;if the threads are not waiting for the SemaCondvar or SemaMonitor object, but when you set the first parameter of the constructor&amp;nbsp;to false it will not behave like a Semaphore because if the threads are not waiting for the SemaCondvar or SemaMonitor the signal will be lost..&lt;BR /&gt;
	&lt;BR /&gt;
	Now you can pass the SemaCondvar's or Semamonitor's initialcount and SemaCondvar's or SemaMonitor's MaximumCount to the construtor, it's like the windows Semaphore`s InitialCount and the Semaphore's MaximumCount.&lt;BR /&gt;
	&lt;BR /&gt;
	Like this:&lt;BR /&gt;
	&lt;BR /&gt;
	t:=TSemaMonitor.create(true,0,4);&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	You have 5 options in the defines.inc file for setting the kind of locks, just look inside defines.inc , if you want to set it for the Mutex that is energy efficient because it blocks the threads,uncomment the option Mutex, if you want to set it for my node based scalable Lock, uncomment the option MLock, if you want to set it for my scalable array based lock called AMLock just uncomment the option AMLock inside defines.inc, if you want to set it for Ticket Spinlock just uncomment the option TicketSpinlock ,If you want to set it for Spinlock just uncomment the option Spinlock.&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;BR /&gt;
	That's all.&lt;BR /&gt;
	&lt;BR /&gt;
	You can download my SemaMonitor and SemaCondvar from:&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;A href="https://sites.google.com/site/aminer68/light-weight-semacondvar-semamonitor"&gt;https://sites.google.com/site/aminer68/light-weight-semacondvar-semamonitor&lt;/A&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	and from:&lt;BR /&gt;
	&lt;BR /&gt;
	&lt;A href="https://sites.google.com/site/aminer68/semacondvar-semamonitor"&gt;https://sites.google.com/site/aminer68/semacondvar-semamonitor&lt;/A&gt;&lt;BR /&gt;
	&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Feel free to port my SemaCondvar and SemaMonitor to other programming languages !&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	&lt;BR /&gt;
	Thank you,&lt;BR /&gt;
	Amine Moulay Ramdane.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 17:39:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Moderncode-for-Parallel/About-my-SemaCondvar-and-SemaMonitor/m-p/1071647#M6994</guid>
      <dc:creator>aminer10</dc:creator>
      <dc:date>2015-11-17T17:39:40Z</dc:date>
    </item>
  </channel>
</rss>

