42 PRINT_ERR(
"%s %d, alloc memory failed\n", __FUNCTION__, __LINE__);
49 PRINT_ERR(
"%s %d, Create mutex for vmm failed\n", __FUNCTION__, __LINE__);
80 if (vid == idNode->
vid) {
97 if (rid == idNode->
rid) {
116 for (i = 0; i < mapMaxNum; i++) {
118 for (j = 0; j < INT_BIT_COUNT; j++) {
119 if ((num & (1 << j)) == 0) {
122 return (INT_BIT_COUNT * i + j);
129 if (mapMaxNum > VID_MAP_MAX_NUM) {
130 PRINT_ERR(
"%s %d, timer vid run out\n", __FUNCTION__, __LINE__);
131 return MAX_INVALID_TIMER_VID;
136 PRINT_ERR(
"%s %d, alloc memory failed\n", __FUNCTION__, __LINE__);
137 return MAX_INVALID_TIMER_VID;
145 return (INT_BIT_COUNT * i);
156 if (vid >= (VID_MAP_MAX_NUM * INT_BIT_COUNT)) {
160 a = vid >> INT_BIT_SHIFT;
161 b = vid & (INT_BIT_COUNT - 1);
163 idMap->
bitMap[a] &= ~(1 << b);
167 if (idMap->
bitMap[mapMaxNum - 1] == 0) {
191 if (vid == MAX_INVALID_TIMER_VID) {
194 return MAX_INVALID_TIMER_VID;
198 PRINT_ERR(
"%s %d, alloc memory failed\n", __FUNCTION__, __LINE__);
201 return MAX_INVALID_TIMER_VID;
LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_ListInit(LOS_DL_LIST *list)
LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_ListTailInsert(LOS_DL_LIST *list, LOS_DL_LIST *node)
Insert a node to the tail of a doubly linked list.
LITE_OS_SEC_ALW_INLINE STATIC INLINE VOID LOS_ListDelete(LOS_DL_LIST *node)
VOID * LOS_MemAlloc(VOID *pool, UINT32 size)
从指定内存池中申请size长度的内存,注意这可不是从内核堆空间中申请内存
VOID * LOS_MemRealloc(VOID *pool, VOID *ptr, UINT32 size)
按size大小重新分配内存块,并将原内存块内容拷贝到新内存块。如果新内存块申请成功,则释放原内存块
UINT32 LOS_MemFree(VOID *pool, VOID *ptr)
释放从指定动态内存中申请的内存
UINT8 * m_aucSysMem0
异常交互动态内存池地址的起始地址,当不支持异常交互特性时,m_aucSysMem0等于m_aucSysMem1。
LITE_OS_SEC_TEXT UINT32 LOS_MuxInit(LosMux *mutex, const LosMuxAttr *attr)
初始化互斥锁
LITE_OS_SEC_TEXT UINT32 LOS_MuxUnlock(LosMux *mutex)
释放锁
LITE_OS_SEC_TEXT UINT32 LOS_MuxDestroy(LosMux *mutex)
销毁互斥锁
LITE_OS_SEC_TEXT UINT32 LOS_MuxLock(LosMux *mutex, UINT32 timeout)
拿互斥锁,
STATIC INLINE LosProcessCB * OsCurrProcessGet(VOID)
ARG_NUM_3 ARG_NUM_1 ARG_NUM_2 ARG_NUM_2 ARG_NUM_3 ARG_NUM_1 ARG_NUM_4 ARG_NUM_2 ARG_NUM_2 ARG_NUM_5 ARG_NUM_2 void
static VOID ReleaseVid(UINT16 vid)
static TimerIdMapNode * FindListNodeByRid(UINT32 rid)
UINT16 GetRidByVid(UINT16 vid)
void VidMapDestroy(LosProcessCB *processCB)
销毁虚拟ID映射
void RemoveNodeByVid(UINT16 vid)
UINT32 VidMapListInit(LosProcessCB *processCB)
static TimerIdMapNode * FindListNodeByVid(UINT16 vid)
static UINT16 GetFreeVid(VOID)
UINT16 AddNodeByRid(UINT16 rid)