EPICS Base  7.0.6.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
epicsExit.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, 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 * SPDX-License-Identifier: EPICS
7 * EPICS BASE is distributed subject to a Software License Agreement found
8 * in file LICENSE that is included with this distribution.
9 \*************************************************************************/
10 /*epicsExit.h*/
23 #ifndef epicsExith
24 #define epicsExith
25 #include <libComAPI.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 typedef void (*epicsExitFunc)(void *arg);
36 
41 LIBCOM_API void epicsExit(int status);
48 LIBCOM_API void epicsExitLater(int status);
56 LIBCOM_API void epicsExitCallAtExits(void);
63 LIBCOM_API int epicsAtExit3(epicsExitFunc func, void *arg, const char* name);
64 
71 #define epicsAtExit(F,A) epicsAtExit3(F,A,#F)
72 
81 LIBCOM_API void epicsExitCallAtThreadExits(void);
88 LIBCOM_API int epicsAtThreadExit(epicsExitFunc func, void *arg);
89 
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /*epicsExith*/
LIBCOM_API void epicsExitLater(int status)
Arrange to call epicsExit() later from a low priority thread.
void(* epicsExitFunc)(void *arg)
Pointer to a callback function that is to be called by the epicsExit subsystem.
Definition: epicsExit.h:35
LIBCOM_API void epicsExitCallAtExits(void)
Internal routine that runs the registered exit routines.
LIBCOM_API int epicsAtThreadExit(epicsExitFunc func, void *arg)
Register a function and an context value to be run by this thread when it returns from its entry rout...
LIBCOM_API void epicsExit(int status)
Calls epicsExitCallAtExits(), then the OS exit() routine.
LIBCOM_API void epicsExitCallAtThreadExits(void)
Internal routine that runs the registered thread exit routines.
LIBCOM_API int epicsAtExit3(epicsExitFunc func, void *arg, const char *name)
Register a function and an associated context parameter.