⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_task_profiling.h

📁 本程序为ST公司开发的源代码
💻 H
字号:
/*____________________________________________________________________________| FILE:         os_task_profiling.h| PROJECT:      OS20_ACCORDO+| SW-COMPONENT: |_____________________________________________________________________________| DESCRIPTION:  OS Header file for task profiling OS handling|_____________________________________________________________________________| COPYRIGHT:    (c) 2005 STMicroelectronics, Arzano (ITALY)| HISTORY:| Date      					     | Modification               | Author|_____________________________________________________________________________| $Date: 2006/04/26 17:59:51 $  | Initial revision           | $Author: kutik $|____________________________________________________________________________*/#ifndef _OS_TASK_PROFILING_H_#define _OS_TASK_PROFILING_H_#if	(OS20_PROFILING == 1)/***********************************************************************************/							/* OS Public functions *//***********************************************************************************/// variable 'task_profiling_activated' shall not been accessed directly, but only// via macro's OS_TASK_PROFILE_xxx() (see below)// functions 'DO_xxx' shall not been called directly, but only// via macro's OS_TASK_PROFILE_xxx() (see below)// To indicate that task-profiling is activatedextern int task_profiling_activated;/* To measure OS context switch */void Do_context_switch (int task_id);/* To measure OS context start (i.e. first thread after an isr */void Do_context_start (int task_id);/* To measure OS isr starting */void Do_isr_start (void);/* To measure OS isr stopping */void Do_isr_end (int vector_id);#define OS_TASK_PROFILE_CONTEXT_SWITCH(a) \   {  \      if (task_profiling_activated) \      {  \         Do_context_switch ((a));   \      }  \   }#define OS_TASK_PROFILE_CONTEXT_START(a) \   {  \      if (task_profiling_activated) \      {  \         Do_context_start ((a));   \      }  \   }#define OS_TASK_PROFILE_ISR_START() \   {  \      if (task_profiling_activated) \      {  \         Do_isr_start ();   \      }  \   }#define OS_TASK_PROFILE_ISR_END(a) \   {  \      if (task_profiling_activated) \      {  \         Do_isr_end ((a));   \      }  \   }#else// No task-profiling, so no code is generated// empty defines!#define OS_TASK_PROFILE_CONTEXT_SWITCH(a)#define OS_TASK_PROFILE_CONTEXT_START(a)#define OS_TASK_PROFILE_ISR_START()#define OS_TASK_PROFILE_ISR_END(a)#endif //#endif (OS20_PROFILING)#endif   // _OS_TASK_PROFILING_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -