From 2826afb3f93e1b7080b1fe36a5e9862ff14abd71 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Tue, 15 Apr 2003 20:05:55 +0000 Subject: [PATCH] putNotifyBlocked no longer necessary --- src/db/dbAccessDefs.h | 3 ++- src/db/dbNotify.c | 4 +--- src/db/dbNotify.h | 14 +------------- src/db/dbPutNotifyBlocker.cpp | 16 ++++------------ src/rsrv/camessage.c | 7 +------ 5 files changed, 9 insertions(+), 35 deletions(-) diff --git a/src/db/dbAccessDefs.h b/src/db/dbAccessDefs.h index 6fe2c7c32..33abea68f 100644 --- a/src/db/dbAccessDefs.h +++ b/src/db/dbAccessDefs.h @@ -179,8 +179,9 @@ struct dbr_alDouble {DBRalDouble}; #define S_db_noRSET (M_dbAccess|31) /*missing record support entry table*/ #define S_db_noSupport (M_dbAccess|33) /*RSET routine not defined*/ #define S_db_BadSub (M_dbAccess|35) /*Subroutine not found*/ -/*!!!! Do not change next two lines without changing src/rsrv/server.h!!!!!!!!*/ +/*!!!! Do not change next line without changing src/rsrv/server.h!!!!!!!!*/ #define S_db_Pending (M_dbAccess|37) /*Request is pending*/ + #define S_db_Blocked (M_dbAccess|39) /*Request is Blocked*/ #define S_db_putDisabled (M_dbAccess|41) /*putFields are disabled*/ #define S_db_bkptSet (M_dbAccess|53) /*Breakpoint already set*/ diff --git a/src/db/dbNotify.c b/src/db/dbNotify.c index 0a5e7b975..5ba0edce6 100644 --- a/src/db/dbNotify.c +++ b/src/db/dbNotify.c @@ -342,9 +342,7 @@ STATIC void dbtpnCallback(putNotify *ppn) { putNotifyStatus status = ppn->status; - if(status==putNotifyBlocked) - printf("dbtpnCallback: blocked record=%s\n",ppn->paddr->precord->name); - else if(status==0) + if(status==0) printf("dbtpnCallback: success record=%s\n",ppn->paddr->precord->name); else errlogPrintf("%s dbtpnCallback putNotify.status %d\n",(int)status); diff --git a/src/db/dbNotify.h b/src/db/dbNotify.h index f93d3514a..f654166c7 100644 --- a/src/db/dbNotify.h +++ b/src/db/dbNotify.h @@ -32,7 +32,6 @@ typedef struct ellCheckNode{ typedef enum { putNotifyOK, putNotifyCanceled, - putNotifyBlocked, putNotifyError }putNotifyStatus; @@ -113,18 +112,7 @@ epicsShareFunc int epicsShareAPI dbNotifyDump(void); * put notify is waiting to complete, and 2) a list of records * to restart. * - * If dbPutNotify finds it's associated record busy, either because another - * dbPutNotify is already active on the same record or because the record - * is active, the request is put on a restartList. - * - * When a putNotify becomes the owner of a record, it trys up to three times - * to find PACT false. If on the third try it finds the record active, - * it gives up and calls the userCallback with status putNotifyBlocked. - * - * When a putNotify calls dbProcess, each record that is processed - * is added to a waitList. The only exception is that if it finds - * the same record that the putNotify references. The reason is that if it - * did it would be easy to create infinite loops of record processing. + * See the Application Developer's Guide for implementation rules */ #ifdef __cplusplus } diff --git a/src/db/dbPutNotifyBlocker.cpp b/src/db/dbPutNotifyBlocker.cpp index dbf373294..0fa176218 100644 --- a/src/db/dbPutNotifyBlocker.cpp +++ b/src/db/dbPutNotifyBlocker.cpp @@ -89,18 +89,10 @@ extern "C" void putNotifyCompletion ( putNotify *ppn ) dbPutNotifyBlocker *pBlocker = static_cast < dbPutNotifyBlocker * > ( ppn->usrPvt ); if ( pBlocker->pNotify ) { if ( pBlocker->pn.status != putNotifyOK) { - if ( pBlocker->pn.status == putNotifyBlocked ) { - pBlocker->pNotify->exception ( - ECA_PUTCBINPROG, "put notify blocked", - static_cast (pBlocker->pn.dbrType), - static_cast (pBlocker->pn.nRequest) ); - } - else { - pBlocker->pNotify->exception ( - ECA_PUTFAIL, "put notify unsuccessful", - static_cast (pBlocker->pn.dbrType), - static_cast (pBlocker->pn.nRequest) ); - } + pBlocker->pNotify->exception ( + ECA_PUTFAIL, "put notify unsuccessful", + static_cast (pBlocker->pn.dbrType), + static_cast (pBlocker->pn.nRequest) ); } else { pBlocker->pNotify->completion (); diff --git a/src/rsrv/camessage.c b/src/rsrv/camessage.c index 4d87cbcf3..b97e5a63e 100644 --- a/src/rsrv/camessage.c +++ b/src/rsrv/camessage.c @@ -1449,12 +1449,7 @@ void write_notify_reply(void *pArg) * status here */ if(ppnb->dbPutNotify.status != putNotifyOK){ - if(ppnb->dbPutNotify.status == putNotifyBlocked){ - status = ECA_PUTCBINPROG; - } - else{ - status = ECA_PUTFAIL; - } + status = ECA_PUTFAIL; } else{ status = ECA_NORMAL;