EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: db_create_event_log
From: "Hill, Jeff" <[email protected]>
To: "[email protected]" <[email protected]>
Date: Mon, 4 Nov 2013 18:05:35 +0000
Hello All,

I was having a closer look at the recent changes in R3.15; my perception is that behavior has changed and that in an out-of-memory situation R3.15 is currently discarding the update for the event queue instead of the original behavior which was replacing the last entry on the queue for the subscription that was being posted, in an out-of-memory situation.

Should I submit a defect report; or perhaps this was this an intentional behavior change in R3.15?

Ref: in the code below if db_create_event_log returns null due to out-of-memory condition then db_post_events is a noop.

int db_post_events(
void            *pRecord,
void            *pField,
unsigned int    caEventMask
)
{
    struct dbCommon   * const prec = (struct dbCommon *) pRecord;
    struct evSubscrip *pevent;

    if (prec->mlis.count == 0) return DB_EVENT_OK;       /* no monitors set */

    LOCKREC (prec);

    for (pevent = (struct evSubscrip *) prec->mlis.node.next;
        pevent; pevent = (struct evSubscrip *) pevent->node.next){

        /*
         * Only send event msg if they are waiting on the field which
         * changed or pval==NULL and waiting on alarms and alarms changed
         */
        if ( (dbChannelField(pevent->chan) == (void *)pField || pField==NULL) &&
            (caEventMask & pevent->select)) {
            db_field_log *pLog = db_create_event_log(pevent);
            pLog = dbChannelRunPreChain(pevent->chan, pLog);
            if (pLog) db_queue_event_log(pevent, pLog);
        }
    }

    UNLOCKREC (prec);
    return DB_EVENT_OK;

}



Replies:
RE: db_create_event_log Hill, Jeff

Navigate by Date:
Prev: Re: [Merge] lp:~epics-core/epics-base/parallel-cbthreads-2 into lp:epics-base mdavidsaver
Next: posting DBE_PROPERTY Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: [Merge] lp:~epics-core/epics-base/parallel-cbthreads-2 into lp:epics-base mdavidsaver
Next: RE: db_create_event_log Hill, Jeff
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 01 Dec 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·