25 if (count > 0 && size > 0) {
26 while ((mem = calloc(count, size)) ==
NULL) {
27 errlogPrintf(
"%s: callocMustSucceed(%lu, %lu) - calloc failed\n",
28 msg, (
unsigned long)count, (
unsigned long)size);
42 while ((mem = malloc(size)) ==
NULL) {
43 errlogPrintf(
"%s: mallocMustSucceed(%lu) - malloc failed\n",
44 msg, (
unsigned long)size);
62 errlogPrintf(
"Thread %s (%p) can't proceed, suspending.\n",
int errlogVprintf(const char *pFormat, va_list pvar)
LIBCOM_API const char *epicsStdCall epicsThreadGetNameSelf(void)
LIBCOM_API void epicsStdCall epicsThreadSuspendSelf(void)
LIBCOM_API void * callocMustSucceed(size_t count, size_t size, const char *msg)
A calloc() that never returns NULL.
int errlogPrintf(const char *pFormat,...)
void epicsStackTrace(void)
LIBCOM_API void * mallocMustSucceed(size_t size, const char *msg)
A malloc() that never returns NULL.
LIBCOM_API void epicsStdCall epicsThreadSleep(double seconds)
Block the calling thread for at least the specified time.
LIBCOM_API void cantProceed(const char *msg,...)
Routines for code that can't continue or return after an error.
C++ and C descriptions for a thread.
LIBCOM_API epicsThreadId epicsStdCall epicsThreadGetIdSelf(void)