Quantcast
Channel: Embedded Software (Read Only)
Viewing all articles
Browse latest Browse all 25965

Forum Post: Clock allocation/deallocation

$
0
0

Hallo,

I have TI-ROTS 2.00.01.23.

I have a task that schedule a deferred function call using Clock:

Void myTask(UArg arg0, UArg arg1) {  Clock_Params clockParams;  Clock_Handle myClock;   Clock_Params_init(&clockParams);  clockParams.period = 0; // one shot  clockParams.startFlag = FALSE;  clockParams.arg = (UArg)0;  myClock = Clock_create((Clock_FuncPtr)fcntCallBack, 0, &clockParams, NULL);   Clock_start(myClock);  while(1); }  void fcntCallBack(UArg a) {  // Something } 

inside documentation I read:

Clock_Handle Clock_create(Clock_FuncPtr clockFxn, UInt timeout, const Clock_Params *params, Error_Block *eb);
// Allocate and initialize a new instance object and return its handle

I wonder if the Clock_create() allocate some memory, who deallocate it and when?

Do I need to call explicitly Clock_delete()? And when?

best regards

Max


Viewing all articles
Browse latest Browse all 25965


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>