Skip to content

Commit 3071948

Browse files
authored
Merge 0463e82 into 8998341
2 parents 8998341 + 0463e82 commit 3071948

File tree

8 files changed

+22
-3
lines changed

8 files changed

+22
-3
lines changed

modules/database/src/ioc/db/dbChannelIO.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* 505 665 1831
1515
*/
1616

17+
#define USE_TYPED_DBEVENT
18+
1719
#include <string>
1820
#include <stdexcept>
1921

modules/database/src/ioc/db/dbContext.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* 505 665 1831
1414
*/
1515

16+
#define USE_TYPED_DBEVENT
17+
1618
#include <limits.h>
1719

1820
#include "epicsMutex.h"

modules/database/src/ioc/db/dbContextReadNotifyCache.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* Author Jeff Hill
1313
*/
1414

15+
#define USE_TYPED_DBEVENT
16+
1517
#include <stdlib.h>
1618

1719
#include "epicsMutex.h"

modules/database/src/ioc/db/dbEvent.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020

2121
#define EPICS_PRIVATE_API
22+
#define USE_TYPED_DBEVENT
23+
2224
#include <stddef.h>
2325
#include <stdlib.h>
2426
#include <stdio.h>

modules/database/src/ioc/db/dbEvent.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,22 @@ struct dbChannel;
3232
struct db_field_log;
3333
struct evSubscrip;
3434

35+
#ifdef USE_TYPED_DBEVENT
36+
struct dbEventContext; // use dbEventCtx
37+
typedef struct evSubscrip* dbEventSubscription;
38+
typedef struct dbEventContext* dbEventCtx;
39+
#else
40+
typedef void * dbEventSubscription;
41+
typedef void * dbEventCtx;
42+
#endif
43+
3544
DBCORE_API int db_event_list (
3645
const char *name, unsigned level);
3746
DBCORE_API int dbel (
3847
const char *name, unsigned level);
3948
DBCORE_API int db_post_events (
4049
void *pRecord, void *pField, unsigned caEventMask );
4150

42-
typedef void * dbEventCtx;
43-
4451
typedef void EXTRALABORFUNC (void *extralabor_arg);
4552
DBCORE_API dbEventCtx db_init_events (void);
4653
DBCORE_API int db_start_events (
@@ -63,7 +70,6 @@ DBCORE_API void db_init_event_freelists (void);
6370
typedef void EVENTFUNC (void *user_arg, struct dbChannel *chan,
6471
int eventsRemaining, struct db_field_log *pfl);
6572

66-
typedef void * dbEventSubscription;
6773
DBCORE_API dbEventSubscription db_add_event (
6874
dbEventCtx ctx, struct dbChannel *chan,
6975
EVENTFUNC *user_sub, void *user_arg, unsigned select);

modules/database/src/ioc/db/dbPutNotifyBlocker.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* 505 665 1831
1616
*/
1717

18+
#define USE_TYPED_DBEVENT
19+
1820
#include <string>
1921
#include <stdexcept>
2022

modules/database/src/ioc/db/dbSubscriptionIO.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* 505 665 1831
1515
*/
1616

17+
#define USE_TYPED_DBEVENT
18+
1719
#include <string>
1820
#include <stdexcept>
1921

modules/database/src/ioc/db/dbUnitTest.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <string.h>
1515

1616
#define EPICS_PRIVATE_API
17+
#define USE_TYPED_DBEVENT
1718

1819
#include "dbmf.h"
1920
#include "epicsUnitTest.h"

0 commit comments

Comments
 (0)