19 #define INCcallbackh 1
21 #include "dbCoreAPI.h"
30 #if defined(_WIN32) && !defined(EPICS_NO_CALLBACK)
36 #define NUM_CALLBACK_PRIORITIES 3
38 #define priorityMedium 1
39 #define priorityHigh 2
41 typedef struct callbackPvt {
42 void (*callback)(
struct callbackPvt*);
48 #if !defined(EPICS_NO_CALLBACK)
52 typedef void (*CALLBACKFUNC)(
struct callbackPvt*);
56 int numUsed[NUM_CALLBACK_PRIORITIES];
57 int maxUsed[NUM_CALLBACK_PRIORITIES];
58 int numOverflow[NUM_CALLBACK_PRIORITIES];
61 #define callbackSetCallback(PFUN, PCALLBACK) \
62 ( (PCALLBACK)->callback = (PFUN) )
63 #define callbackSetPriority(PRIORITY, PCALLBACK) \
64 ( (PCALLBACK)->priority = (PRIORITY) )
65 #define callbackGetPriority(PRIORITY, PCALLBACK) \
66 ( (PRIORITY) = (PCALLBACK)->priority )
67 #define callbackSetUser(USER, PCALLBACK) \
68 ( (PCALLBACK)->user = (void *) (USER) )
69 #define callbackGetUser(USER, PCALLBACK) \
70 ( (USER) = (PCALLBACK)->user )
72 DBCORE_API
void callbackInit(
void);
73 DBCORE_API
void callbackStop(
void);
74 DBCORE_API
void callbackCleanup(
void);
76 DBCORE_API
void callbackSetProcess(
78 DBCORE_API
int callbackRequestProcessCallback(
80 DBCORE_API
void callbackRequestDelayed(
82 DBCORE_API
void callbackCancelDelayed(
epicsCallback *pcallback);
83 DBCORE_API
void callbackRequestProcessCallbackDelayed(
84 epicsCallback *pCallback,
int Priority,
void *pRec,
double seconds);
85 DBCORE_API
int callbackSetQueueSize(
int size);
87 DBCORE_API
void callbackQueueShow(
const int reset);
88 DBCORE_API
int callbackParallelThreads(
int count,
const char *prio);