EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: unsymmetrical mutex use in dbCa.c
From: Dirk Zimoch <[email protected]>
To: Dirk Zimoch <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Wed, 08 Jun 2011 16:41:01 +0200
All-clear.

I found that pcaGetCheck is a macro that does the epicsMutexMustLock.

Sorry for the panic.

Dirk


Dirk Zimoch wrote:
Hi all (gurus especially)

By coincidence I found a strange thing in src/db/dbCa.c. Some functions call epicsMutexUnlock(pca->lock) without taking the lock first.

Example:

long epicsShareAPI dbCaGetNelements(
    const struct link *plink,long *nelements)
{
    caLink    *pca;

    pcaGetCheck
    *nelements = pca->nelements;
    epicsMutexUnlock(pca->lock);
    return(0);
}

This looks quite wrong to me. Am I missing something or is this a bug?

These are the functions
* dbCaGetNelements
* dbCaGetSevr
* dbCaGetTimeStamp
* dbCaGetLinkDBFtype
* dbCaGetControlLimits
* dbCaGetGraphicLimits
* dbCaGetAlarmLimits
* dbCaGetPrecision
* dbCaGetUnits


Dirk





References:
unsymmetrical mutex use in dbCa.c Dirk Zimoch

Navigate by Date:
Prev: unsymmetrical mutex use in dbCa.c Dirk Zimoch
Next: RE: unsymmetrical mutex use in dbCa.c Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: unsymmetrical mutex use in dbCa.c Dirk Zimoch
Next: RE: unsymmetrical mutex use in dbCa.c Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·