<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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/"><channel><title>Rtl os_tsk_create_ex and c++</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/25748/rtl-os_tsk_create_ex-and-c</link><description> 
Hi, 

 
i am using the Arm RL-RTX. Creating a task with os_tsk_create(...)
works correctly in C, but calling the same function from C++ (.cpp
file) gives me the following Error message: 
error: #167: argument of type &amp;quot;void (*)(int *)&amp;quot; is incompatible</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Rtl os_tsk_create_ex and c++</title><link>https://community.arm.com/thread/101880?ContentTypeID=1</link><pubDate>Sun, 19 Jul 2009 01:02:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:9485566a-ce0d-40a8-9037-6a88545b0e69</guid><dc:creator>Eugen Mailaender</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thank you very much, Robert.&lt;br /&gt;
it works.&lt;/p&gt;

&lt;pre&gt;
os_tsk_create_ex (
                (void(*)(void *)) TaskWithParamsX,
                 2,
                 &amp;amp;ii
         );
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rtl os_tsk_create_ex and c++</title><link>https://community.arm.com/thread/77590?ContentTypeID=1</link><pubDate>Sat, 18 Jul 2009 19:04:50 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bc8fa2ca-0afd-4a46-aa59-84cf1d2d6515</guid><dc:creator>Robert McNamara</dc:creator><description>&lt;p&gt;&lt;p&gt;
C++ is more &amp;quot;strongly typed&amp;quot; than C.&lt;/p&gt;

&lt;p&gt;
If you want to remove the error, type cast the entry point.&lt;/p&gt;

&lt;pre&gt;
os_tsk_create_ex ( ((void(*)(void *)) TaskWithParams, 2,  &amp;Atilde;&amp;sbquo;&amp;Acirc;&amp;para;m[2]);
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rtl os_tsk_create_ex and c++</title><link>https://community.arm.com/thread/56461?ContentTypeID=1</link><pubDate>Sat, 18 Jul 2009 07:09:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:40c5340e-9205-4d26-9c23-102bd352d1cb</guid><dc:creator>Eugen Mailaender</dc:creator><description>&lt;p&gt;&lt;p&gt;
the following row was not readable, sorry:&lt;/p&gt;

&lt;pre&gt;
os_tsk_create_ex (TaskWithParams, 2,  &amp;Acirc;&amp;para;m[2]);
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>