Add typing to dbEvent.h opaque structs when -DUSE_TYPED_DBEVENT
This commit is contained in:

committed by
Andrew Johnson

parent
3b50194837
commit
2e4113b63b
@ -14,6 +14,8 @@
|
|||||||
* 505 665 1831
|
* 505 665 1831
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define USE_TYPED_DBEVENT
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
* 505 665 1831
|
* 505 665 1831
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define USE_TYPED_DBEVENT
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
#include "epicsMutex.h"
|
#include "epicsMutex.h"
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
* Author Jeff Hill
|
* Author Jeff Hill
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define USE_TYPED_DBEVENT
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "epicsMutex.h"
|
#include "epicsMutex.h"
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define EPICS_PRIVATE_API
|
#define EPICS_PRIVATE_API
|
||||||
|
#define USE_TYPED_DBEVENT
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -32,6 +32,15 @@ struct dbChannel;
|
|||||||
struct db_field_log;
|
struct db_field_log;
|
||||||
struct evSubscrip;
|
struct evSubscrip;
|
||||||
|
|
||||||
|
#ifdef USE_TYPED_DBEVENT
|
||||||
|
struct dbEventContext; // use dbEventCtx
|
||||||
|
typedef struct evSubscrip* dbEventSubscription;
|
||||||
|
typedef struct dbEventContext* dbEventCtx;
|
||||||
|
#else
|
||||||
|
typedef void * dbEventSubscription;
|
||||||
|
typedef void * dbEventCtx;
|
||||||
|
#endif
|
||||||
|
|
||||||
DBCORE_API int db_event_list (
|
DBCORE_API int db_event_list (
|
||||||
const char *name, unsigned level);
|
const char *name, unsigned level);
|
||||||
DBCORE_API int dbel (
|
DBCORE_API int dbel (
|
||||||
@ -39,8 +48,6 @@ DBCORE_API int dbel (
|
|||||||
DBCORE_API int db_post_events (
|
DBCORE_API int db_post_events (
|
||||||
void *pRecord, void *pField, unsigned caEventMask );
|
void *pRecord, void *pField, unsigned caEventMask );
|
||||||
|
|
||||||
typedef void * dbEventCtx;
|
|
||||||
|
|
||||||
typedef void EXTRALABORFUNC (void *extralabor_arg);
|
typedef void EXTRALABORFUNC (void *extralabor_arg);
|
||||||
DBCORE_API dbEventCtx db_init_events (void);
|
DBCORE_API dbEventCtx db_init_events (void);
|
||||||
DBCORE_API int db_start_events (
|
DBCORE_API int db_start_events (
|
||||||
@ -63,7 +70,6 @@ DBCORE_API void db_init_event_freelists (void);
|
|||||||
typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
|
typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
|
||||||
int eventsRemaining, struct db_field_log *pfl);
|
int eventsRemaining, struct db_field_log *pfl);
|
||||||
|
|
||||||
typedef void * dbEventSubscription;
|
|
||||||
DBCORE_API dbEventSubscription db_add_event (
|
DBCORE_API dbEventSubscription db_add_event (
|
||||||
dbEventCtx ctx, struct dbChannel *chan,
|
dbEventCtx ctx, struct dbChannel *chan,
|
||||||
EVENTFUNC *user_sub, void *user_arg, unsigned select);
|
EVENTFUNC *user_sub, void *user_arg, unsigned select);
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
* 505 665 1831
|
* 505 665 1831
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define USE_TYPED_DBEVENT
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
* 505 665 1831
|
* 505 665 1831
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define USE_TYPED_DBEVENT
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define EPICS_PRIVATE_API
|
#define EPICS_PRIVATE_API
|
||||||
|
#define USE_TYPED_DBEVENT
|
||||||
|
|
||||||
#include "dbmf.h"
|
#include "dbmf.h"
|
||||||
#include "epicsUnitTest.h"
|
#include "epicsUnitTest.h"
|
||||||
|
Reference in New Issue
Block a user