This is Unofficial EPICS BASE Doxygen Site
cantProceed.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
18 /* callocMustSucceed() and mallocMustSucceed() can be
19  * used in place of calloc() and malloc(). If size or count are zero, or the
20  * memory allocation fails, they output a message and call cantProceed().
21  */
22 
23 
24 #ifndef INCcantProceedh
25 #define INCcantProceedh
26 
27 #include <stdlib.h>
28 
29 #include "compilerDependencies.h"
30 #include "libComAPI.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
45 LIBCOM_API void cantProceed(const char *errorMessage, ...)
46  EPICS_PRINTF_STYLE(1,2);
47 
63 LIBCOM_API void * callocMustSucceed(size_t count, size_t size,
64  const char *errorMessage);
70 LIBCOM_API void * mallocMustSucceed(size_t size, const char *errorMessage);
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* cantProceedh */
LIBCOM_API void * mallocMustSucceed(size_t size, const char *errorMessage)
A malloc() that never returns NULL.
Definition: cantProceed.c:38
#define EPICS_PRINTF_STYLE(f, a)
LIBCOM_API void * callocMustSucceed(size_t count, size_t size, const char *errorMessage)
A calloc() that never returns NULL.
Definition: cantProceed.c:22
LIBCOM_API void cantProceed(const char *errorMessage,...) EPICS_PRINTF_STYLE(1
Suspend this thread, the caller cannot continue or return.
Compiler specific declarations.