removed my junk
This commit is contained in:
@@ -395,66 +395,4 @@ long dbtpn(char *pname,char *pvalue)
|
||||
errMessage(status, "dbtpn");
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* dbCreatePutNotify()
|
||||
*/
|
||||
epicsShareFunc long epicsShareAPI dbPutNotifyInitiate (
|
||||
struct dbAddr *pAddr, unsigned type, unsigned long count, const void *pValue,
|
||||
void (*callback)(void *), void *usrPvt, dbPutNotifyID *pID)
|
||||
{
|
||||
PUTNOTIFY *ppn;
|
||||
long dbStatus;
|
||||
|
||||
if (!putNotifyFreeList) {
|
||||
freeListInitPvt (&putNotifyFreeList, sizeof (PUTNOTIFY), 100);
|
||||
if (!putNotifyFreeList) {
|
||||
return S_db_noMemory;
|
||||
}
|
||||
}
|
||||
|
||||
if ( type > SHRT_MAX) {
|
||||
return S_db_badDbrtype;
|
||||
}
|
||||
|
||||
if ( count > LONG_MAX ) {
|
||||
return S_db_errArg;
|
||||
}
|
||||
|
||||
ppn = freeListCalloc (putNotifyFreeList);
|
||||
if (!ppn) {
|
||||
return S_db_noMemory;
|
||||
}
|
||||
|
||||
ppn->paddr = pAddr;
|
||||
ppn->pbuffer = pValue;
|
||||
ppn->dbrType = (short) type; /* see range check above */
|
||||
ppn->nRequest = (long) count; /* see range check above */
|
||||
ppn->userCallback = callback;
|
||||
ppn->usrPvt = usrPvt;
|
||||
|
||||
dbStatus = dbPutNotify (ppn);
|
||||
if (dbStatus==S_db_Pending) {
|
||||
*pID = (dbPutNotifyID) ppn;
|
||||
}
|
||||
else if (dbStatus==S_db_Blocked || dbStatus==0) {
|
||||
free (ppn);
|
||||
*pID = 0;
|
||||
}
|
||||
|
||||
return dbStatus;
|
||||
}
|
||||
|
||||
|
||||
epicsShareFunc void epicsShareAPI dbPutNotifyDestroy (dbPutNotifyID idIn)
|
||||
{
|
||||
if (idIn==0) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
PUTNOTIFY *ppn = (PUTNOTIFY *) idIn;
|
||||
dbNotifyCancel (ppn);
|
||||
freeListFree (putNotifyFreeList, ppn);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user