/************************************************************************** | |
* | |
* Copyright (c) 2012 ZTE Corporation. | |
* | |
*************************************************************************** | |
* Ä£ ¿é Ãû : P98C_OSS | |
* ÎÄ ¼þ Ãû : sup.h | |
* Ïà¹ØÎļþ : | |
* ʵÏÖ¹¦ÄÜ : supÄÚ²¿Í·Îļþ,¶¨ÒåÄÚ²¿¸÷Ä£¿é¹«¹²Êý¾Ý½á¹¹µÈ | |
* ×÷ Õß : hongkun | |
* °æ ±¾ : V1.0 | |
* Íê³ÉÈÕÆÚ : 2007-10-25 | |
* ÆäËü˵Ã÷ : | |
**************************************************************************/ | |
/************************************************************************** | |
* Ð޸ļǼ | |
**************************************************************************/ | |
/************************************************************************** | |
* Ð޸ıàºÅ : 0001 | |
* ÐÞ ¸Ä ÈË : chenxingfang | |
* ÐÞ¸ÄÈÕÆÚ : 2012-09-17 | |
* ÐÞ¸ÄÄÚÈÝ : ¸ñʽ¹æ·¶ºÍPC-LINT×ß²é EC:617001782014 | |
**************************************************************************/ | |
#ifndef _SUP_H | |
#define _SUP_H | |
/************************************************************************** | |
* #includeÇø | |
**************************************************************************/ | |
#ifdef __cplusplus | |
extern "C" | |
{ | |
#endif | |
/************************************************************************** | |
* ºê¶¨ÒåÇø | |
**************************************************************************/ | |
#define CHANNEL_CFG_NUM 30 | |
#define SUP_THREAD_LIVE_BIT 1 | |
#define SUP_THREAD_LAZY_BIT 2 | |
#define SUP_THREAD_STATISTIC_INFO_BIT 4 | |
#ifdef _OS_TOS | |
#define TOS_STATISTIC_TIMESLICE | |
#endif | |
/************************************************************************** | |
* Êý¾Ý½á¹¹¶¨ÒåÇø | |
**************************************************************************/ | |
/* ÄÚ´æ¹ÜÀíÄ£¿é */ | |
typedef struct | |
{ | |
T_ZOss_Node node; /* Á´±í¿ØÖƽṹ */ | |
VOID *mem; /* ÄÚ´æÖ¸Õë */ | |
UINT32 mem_size; /* ÄÚ´æ´óС */ | |
CHAR name[12]; /* ÉêÇëλÖÃÎļþ */ | |
UINT32 line; /* ÉêÇëλÖÃÐкŠ*/ | |
ZOSS_THREAD_ID thread_id; /* ÉêÇëÏ̺߳Š*/ | |
ZOSS_TASK_ID task_id; /* ÉêÇëÈÎÎñºÅ */ | |
UINT32 apply_time_tick; /* ÉêÇëʱ¼ä(TICK) */ | |
}T_Mem_MemNodeInfo; /* ϵͳÄÚ´æÐÅÏ¢ */ | |
/************************************************************************** | |
* º¯ÊýÉùÃ÷Çø | |
**************************************************************************/ | |
UINT32 TIMER_Init(VOID); | |
UINT32 TEST_Init(VOID); | |
UINT32 PSM_Init(VOID); | |
UINT32 NV_Init(VOID); | |
#ifdef TOS_STATISTIC_TIMESLICE | |
void zOss_StatisticTimesliceStart(UINT32 time_len, UINT32 type); | |
#endif | |
/*ÈÎÎñ¹ÜÀíÄ£¿é */ | |
UINT32 SCHE_Init(VOID); | |
UINT32 zOss_TaskSendDataEx(T_ZOss_TaskMsgHead *buf); | |
UINT32 Sche_TaskSend(UINT32 msg_id, VOID *buf, UINT16 msg_len, ZOSS_TASK_ID s_task_id, ZOSS_TASK_ID t_task_id); | |
UINT32 Sche_TaskSendData(UINT32 msg_id, VOID *buf, UINT16 msg_len, ZOSS_TASK_ID s_task_id, ZOSS_TASK_ID t_task_id); | |
UINT32 Sche_InterruptTaskSend(UINT32 msg_id, T_ZOss_TaskMsgHead *pMsg, UINT16 msg_len, ZOSS_TASK_ID task_id); | |
VOID *Sche_getBufPoint(T_ZOss_TaskMsgHead *phead); | |
UINT32 Sche_getBufLength(T_ZOss_TaskMsgHead *phead); | |
UINT32 Sche_DeadLoop(ZOSS_TASK_ID *task_id_arr); | |
/* ÄÚ´æ¹ÜÀíÄ£¿é */ | |
UINT32 MEM_Init(VOID); | |
VOID FS_Init(VOID); | |
UINT32 Mem_GetSysMemDebugInfo(T_ZOss_List *mem_debug_info_lst); | |
UINT32 Mem_GetUBUseInfo(T_Mem_UBPoolGrpInfo *ub_pool_grp_info, UINT8 num); | |
UINT32 Mem_CheckUBLeak(T_Mem_UBLeakInfo *ub_leak_info, UINT32 ub_leak_time, UINT8 poolNum, UINT32 size); | |
UINT32 Mem_ThreadUBInfo(ZOSS_THREAD_ID threadId, T_Mem_UBBlockInfo *threadUbInfo, UINT32 num, UINT8 poolNum); | |
UINT32 Mem_TaskUBInfo(ZOSS_TASK_ID taskId, T_Mem_UBBlockInfo *taskUbInfo, UINT32 num, UINT8 poolNum); | |
/* Òì³£¹ÜÀíÄ£¿é */ | |
UINT32 EXCEP_Init(VOID); | |
VOID Excep_DaemonTask(UINT8 state, UINT32 msg_id, UINT8 *buf, UINT16 msg_len, UINT8 *private_data); | |
/* Ê¡µç¹³×Óº¯Êý*/ | |
VOID zOss_ThreadSwapInPsmHook(T_ZOsa_ThreadUserArea *user_area); | |
VOID zOss_ThreadSwapOutPsmHook(T_ZOsa_ThreadUserArea *user_area); | |
VOID zOss_RecordPsmLastSwapTime(VOID); | |
VOID zOss_ClearSleepTime(VOID); | |
/************************************************************************** | |
* È«¾Ö³£Á¿/±äÁ¿ÉùÃ÷Çø | |
**************************************************************************/ | |
#ifdef __cplusplus | |
} | |
#endif | |
#endif /* _SUP_H */ | |