<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Event manager thread safe?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81455/event-manager-thread-safe</link><description>I&amp;#39;m starting a new project and are looking for a way to sync data and events between threads. 
 I have found the event manager and Zephyr FIFO, Queues etc. 
 I can&amp;#39;t see any information about thread safety, and since they pass pointers I get a bit confused</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Nov 2021 14:41:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81455/event-manager-thread-safe" /><item><title>RE: Event manager thread safe?</title><link>https://devzone.nordicsemi.com/thread/338223?ContentTypeID=1</link><pubDate>Tue, 09 Nov 2021 14:41:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb43b171-d771-4c7d-b8b8-e0c859e9f011</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;OK, looking into the code a bit more deeper, the easiest way the event manager ensures that the pointers are valid and offers thread safe mechanism by forcing the application to create a new event using&amp;nbsp;&lt;span&gt;new_&lt;/span&gt;&lt;em&gt;event_type_name&lt;/em&gt;&lt;span&gt;&amp;nbsp;just before you configure the event and submit it.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event manager thread safe?</title><link>https://devzone.nordicsemi.com/thread/338017?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 21:36:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7344b40e-39f7-4f08-abdb-eb627e0059d4</guid><dc:creator>FZe</dc:creator><description>&lt;p&gt;How do I ensure this if I send an event from a thread?&lt;/p&gt;
&lt;p&gt;Do I need to check if the event have been handled somehow before sending a new one?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Event manager thread safe?</title><link>https://devzone.nordicsemi.com/thread/337892?ContentTypeID=1</link><pubDate>Mon, 08 Nov 2021 11:24:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b18a7c92-1468-4170-b419-d64a3ab7b910</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;The event manager have its own spinlock so all handling of events (submitting to queues and later processing them) are done using this spinlock. Your application should just make sure that the memory pointers are still pointing to the valid memory and the rest should be handled in the thread safe way.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>