02.01.2015 Views

CooCox CoOS User's Guide

CooCox CoOS User's Guide

CooCox CoOS User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

#include "CCRTOS.h"<br />

void TaskN (void *pdata)<br />

{<br />

OS_TID tid;<br />

...<br />

tid = CoGetCurTaskID();<br />

printf("Current task ID is %d !\n",tid);<br />

...<br />

}<br />

Note:<br />

None<br />

6.2.5 CoSetPriority()<br />

Function Prototype:<br />

StatusType CoSetPriority<br />

Description:<br />

(<br />

);<br />

OS_TID<br />

U8<br />

taskID,<br />

priority<br />

Set the priority of the designated task and return the executing state of the<br />

function.<br />

Parameters:<br />

[in] task ID<br />

ID of the designated task<br />

[in] Priority<br />

Returns:<br />

The priority to which the task will be set<br />

E_INVALID_ID,<br />

E_OK,<br />

The task ID is invalid.<br />

Reset successfully.<br />

Example Usage:<br />

53

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!