*/
#ifdef ANSI
-PUBLIC S16 cmAllocEvnt
+S16 cmAllocEvnt
(
Size evntSize, /* Size of the Event structure */
Size maxBlkSize, /* Chunk Memory size */
Ptr *ptr /* Location to place allocated event ptr */
)
#else
-PUBLIC S16 cmAllocEvnt (evntSize,maxBlkSize,sMem,ptr)
+S16 cmAllocEvnt (evntSize,maxBlkSize,sMem,ptr)
Size evntSize; /* Size of the Event structure */
Size maxBlkSize; /* Memory size requested */
Mem *sMem; /* Static Memory region and pool */
printf("eventSize [%ld] greater than maxBlkSize [%ld]\n",
evntSize, maxBlkSize);
#endif
- RETVALUE(RFAILED);
+ return RFAILED;
}
#endif
(Size)(maxBlkSize + sizeof(CmMemList))) != ROK)
#endif /* SS_LOCKLESS_MEMORY */
- RETVALUE(RFAILED);
+ return RFAILED;
/* Reset the contents */
cmMemset((U8 *)allocPtr, (U8 )0,
*ptr = (Ptr) ((PTR)allocPtr + sizeof(CmMemList));
cb->runPtr = ((PTR)(*ptr) + evntSize);
- RETVALUE(ROK);
+ return ROK;
} /* End of cmAllocEvnt */
*/
#ifdef ANSI
-PUBLIC Void cmInitMemCp
+Void cmInitMemCp
(
CmMemListCp *memCp, /* Memory control pointer */
Size maxBlkSize, /* Chunk Memory size */
Mem *sMem /* Static memory region and pool */
)
#else
-PUBLIC Void cmInitMemCp (memCp,maxBlkSize,sMem)
+Void cmInitMemCp (memCp,maxBlkSize,sMem)
CmMemListCp *memCp; /* Memory control pointer */
Size maxBlkSize; /* Memory size requested */
Mem *sMem; /* Static Memory region and pool */
*/
#ifdef ANSI
-PUBLIC S16 cmGetMem
+S16 cmGetMem
(
Ptr memPtr, /* Pointer to memCp */
Size size, /* Memory size requested */
Ptr *allocPtr /* location to place pointer */
)
#else
-PUBLIC S16 cmGetMem (memPtr,size,allocPtr)
+S16 cmGetMem (memPtr,size,allocPtr)
Ptr memPtr; /* Pointer to memCp */
Size size; /* Memory size requested */
Ptr *allocPtr; /* location to place pointer */
*allocPtr = (Ptr) cb->runPtr;
cb->memAllocated += size;
cb->runPtr += size;
- RETVALUE(ROK);
+ return ROK;
}
}
(Data **)&(cb->initPtr),
(Size)(blkSize + sizeof(CmMemList)) ) != ROK)
#endif /* SS_LOCKLESS_MEMORY */
- RETVALUE(RFAILED);
+ return RFAILED;
/* Reset the contents */
/* Initialise above allocated structure */
*allocPtr = (Ptr) ((PTR)cb->initPtr + sizeof(CmMemList));
cb->runPtr = ((PTR)(*allocPtr) + size);
- RETVALUE(ROK);
+ return ROK;
} /* End of cmGetMem */
*/
#ifdef ANSI
-PUBLIC S16 cmAllocEvntNoInit
+S16 cmAllocEvntNoInit
(
Size evntSize, /* Size of the Event structure */
Size maxBlkSize, /* Chunk Memory size */
Ptr *ptr /* Location to place allocated event ptr */
)
#else
-PUBLIC S16 cmAllocEvntNoInit (evntSize,maxBlkSize,sMem,ptr)
+S16 cmAllocEvntNoInit (evntSize,maxBlkSize,sMem,ptr)
Size evntSize; /* Size of the Event structure */
Size maxBlkSize; /* Memory size requested */
Mem *sMem; /* Static Memory region and pool */
/* Validation check */
if( evntSize > maxBlkSize)
- RETVALUE(RFAILED);
+ return RFAILED;
/* Allocate memory for the first Memory Chunk */
/* Allocated memory should be maxBlkSize + sizeof(CmMemList) */
(Size)(maxBlkSize + sizeof(CmMemList))) != ROK)
#endif /* SS_LOCKLESS_MEMORY */
- RETVALUE(RFAILED);
+ return RFAILED;
/* Reset the contents */
cmMemset((U8 *)allocPtr, (U8 )0,
*ptr = (Ptr) ((PTR)allocPtr + sizeof(CmMemList));
cb->runPtr = ((PTR)(*ptr) + evntSize);
- RETVALUE(ROK);
+ return ROK;
} /* End of cmAllocEvntNoInit */
*/
#ifdef ANSI
-PUBLIC S16 cmGetMemNoInit
+S16 cmGetMemNoInit
(
Ptr memPtr, /* Pointer to memCp */
Size size, /* Memory size requested */
Ptr *allocPtr /* location to place pointer */
)
#else
-PUBLIC S16 cmGetMemNoInit (memPtr,size,allocPtr)
+S16 cmGetMemNoInit (memPtr,size,allocPtr)
Ptr memPtr; /* Pointer to memCp */
Size size; /* Memory size requested */
Ptr *allocPtr; /* location to place pointer */
// (PTR)(size) );
cb->memAllocated += size;
cb->runPtr += size;
- RETVALUE(ROK);
+ return ROK;
}
}
(Data **)&(cb->initPtr),
(Size)(blkSize + sizeof(CmMemList)) ) != ROK)
#endif /* SS_LOCKLESS_MEMORY */
- RETVALUE(RFAILED);
+ return RFAILED;
/* Reset the contents */
/* Initialise above allocated structure */
*allocPtr = (Ptr) ((PTR)cb->initPtr + sizeof(CmMemList));
cb->runPtr = ((PTR)(*allocPtr) + size);
- RETVALUE(ROK);
+ return ROK;
} /* End of cmGetMemNoInit */
*/
#ifdef ANSI
-PUBLIC Void cmFreeMem
+Void cmFreeMem
(
Ptr memPtr /* Link List CP */
)
#else
-PUBLIC Void cmFreeMem (memPtr)
+Void cmFreeMem (memPtr)
Ptr memPtr; /* Link List CP */
#endif
{
*/
#ifdef ANSI
-PUBLIC Void cmGetMemStatus
+Void cmGetMemStatus
(
Ptr memPtr, /* Memory control pointer */
CmMemStatus *status /* memory region,pool and status */
)
#else
-PUBLIC Void cmGetMemStatus (memPtr,status)
+Void cmGetMemStatus (memPtr,status)
Ptr memPtr; /* Memory control pointer */
CmMemStatus *status; /* memory region,pool and status */
#endif