Added db_available_logs() for filter test code to use

Returns the number of items available on the db_field_log free-list.
This commit is contained in:
Andrew Johnson
2019-06-26 23:28:51 -05:00
parent deb9dbcd77
commit 398fdee33e
2 changed files with 6 additions and 1 deletions

View File

@@ -1165,3 +1165,8 @@ void db_delete_field_log (db_field_log *pfl)
freeListFree(dbevFieldLogFreeList, pfl);
}
}
int db_available_logs(void)
{
return (int) freeListItemsAvail(dbevFieldLogFreeList);
}

View File

@@ -78,6 +78,7 @@ epicsShareFunc void db_event_disable (dbEventSubscription es);
epicsShareFunc struct db_field_log* db_create_event_log (struct evSubscrip *pevent);
epicsShareFunc struct db_field_log* db_create_read_log (struct dbChannel *chan);
epicsShareFunc void db_delete_field_log (struct db_field_log *pfl);
epicsShareFunc int db_available_logs(void);
#define DB_EVENT_OK 0
#define DB_EVENT_ERROR (-1)
@@ -87,4 +88,3 @@ epicsShareFunc void db_delete_field_log (struct db_field_log *pfl);
#endif
#endif /*INCLdbEventh*/