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: unsymmetrical mutex use in dbCa.c
From: Dirk Zimoch <[email protected]>
To: "[email protected]" <[email protected]>
Date: Wed, 08 Jun 2011 15:53:41 +0200
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



Replies:
Re: unsymmetrical mutex use in dbCa.c Dirk Zimoch
RE: unsymmetrical mutex use in dbCa.c Jeff Hill

Navigate by Date:
Prev: general purpose callback tasks : callbackRequest() John Dobbins
Next: Re: unsymmetrical mutex use in dbCa.c Dirk Zimoch
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: RE: general purpose callback tasks : callbackRequest() Davidsaver, Michael
Next: Re: unsymmetrical mutex use in dbCa.c Dirk Zimoch
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 ·