码迷,mamicode.com
首页 > 其他好文 > 详细

ZStack任务

时间:2016-02-21 12:47:11      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:

      任何一个任务必须包含初始化和处理函数(即ProcessEvent),其具体信息如下:

Any OSAL Task must implement two methods:one to perform task initialization and the other to handle task

events.

1.2.5.1  Task Initialization

The callback function to perform task initialization is named like this in the sample applications: “Application

Name”_Init (e.g. GenericApp_Init). The task initialization function should accomplish the following:

-  Initialization  of  variables  local  to  or  specific  for  the  corresponding  Application  Object(s).  Any  long-lived heap  memory  allocation should  be  made  in  order  to  facilitate  more  efficient  heap  memory

management by the OSAL.

-  Instantiation  of  the  corresponding  Application  Object(s)  by  registering  with  the  AF  layer  (e.g.

afRegister()).

-  Registration with the applicable OSAL or HAL system services (e.g.RegisterForKeys()).

1.2.5.2  Task Event Handler

The  callback  function  to  handle  task  events  is  named  like  this  in  the  sample  applications:  “Application

Name”_ProcessEvent (e.g. GenericApp_ProcessEvent()). Any OSAL Task can define up to 15 events in

addition to the mandatory event.

ZStack任务

标签:

原文地址:http://www.cnblogs.com/farbeyond/p/5204666.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!