pcp
[Top] [All Lists]

pcp updates - another milestone for PCP 4.0

To: pcp@xxxxxxxxxxx
Subject: pcp updates - another milestone for PCP 4.0
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Tue, 05 Jul 2011 15:24:09 +1000
Changes committed to git://oss.sgi.com/kenj/pcp.git pcp4
(note this is the pcp4 branch)

 man/man3/pmatomstr.3                |   20 ++++
 man/man3/pmeventflagsstr.3          |   25 +++++
 man/man3/pmidstr.3                  |   25 +++++
 man/man3/pmindomstr.3               |   25 +++++
 man/man3/pmnumberstr.3              |   19 +++-
 man/man3/pmtypestr.3                |   26 +++++
 man/man3/pmunitsstr.3               |   21 ++++
 src/include/impl.h                  |    9 +-
 src/include/pmapi.h                 |   21 +++-
 src/libpcp/src/context.c            |    3 
 src/libpcp/src/derive.c             |    8 +
 src/libpcp/src/derive_fetch.c       |   12 +-
 src/libpcp/src/events.c             |    9 +-
 src/libpcp/src/fetchlocal.c         |    3 
 src/libpcp/src/freeresult.c         |    6 -
 src/libpcp/src/instance.c           |    3 
 src/libpcp/src/interp.c             |   33 +++++--
 src/libpcp/src/lock.c               |    8 +
 src/libpcp/src/logmeta.c            |    9 +-
 src/libpcp/src/logutil.c            |   89 +++++++++-----------
 src/libpcp/src/optfetch.c           |   27 +++---
 src/libpcp/src/p_desc.c             |    5 -
 src/libpcp/src/p_pmns.c             |   11 +-
 src/libpcp/src/p_result.c           |   14 ++-
 src/libpcp/src/pdu.c                |   64 ++++++++------
 src/libpcp/src/pmns.c               |   19 ++--
 src/libpcp/src/profile.c            |   11 +-
 src/libpcp/src/tz.c                 |  104 +++++++++++++++++++----
 src/libpcp/src/units.c              |  158 ++++++++++++++++++++++--------------
 src/libpcp/src/util.c               |  130 ++++++++++++++++++-----------
 src/libpcp_gui/src/timestate.c      |    3 
 src/libpcp_import/src/archive.c     |    6 -
 src/libpcp_import/src/import.c      |    9 +-
 src/libpcp_pmcd/src/trace.c         |   25 ++---
 src/libpcp_pmda/src/cache.c         |   21 +++-
 src/libpcp_pmda/src/callback.c      |   52 ++++++++---
 src/libpcp_pmda/src/mainloop.c      |    3 
 src/libpcp_pmda/src/open.c          |   15 ++-
 src/pmdas/roomtemp/mlan/GNUmakefile |    1 
 39 files changed, 712 insertions(+), 340 deletions(-)

commit 600be1b3657da46926368fb39eda88286c3d1918
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Jul 5 15:13:49 2011 +1000

    libpcp - static buffer changes
    
    All of these routines return a string value in a static buffer and hence
    are not thread-safe: pmAtomStr, pmEventFlagsStr, pmIDStr, pmInDomStr,
    pmNumberStr, pmTypeStr and pmUnitsStr.
    
    This commit adds Berkeley-style equivalents for each so
        pmFooStr(args)
    is accompanied by the thread-safe version
        pmFooStr_r(args ..., char *buf, int buflen)
    to allow the value to be returned in a buffer managed by the caller.
    
    The same change was made for the (undocumented) internal routines
    __pmPDUTypeStr, __pmLogName and __pmTimezone which also return values
    via a static buffer.
    
    Also change all the internal calls to these routines in libpcp and
    the other PCP libraries to use the thread-safe variants.
    
    A related change was to the static method statestr() in optfetch.c
    where the function was changed to use a caller-provided buffer
    rather than a local static buffer.
    
    In libpcp/src/tz.c there are even more extensive changes to use
    the big library lock to make references to the static variables
    and the calls to unsafe libc routines all thread-safe.

commit 9ef4f3c229a837c8c0aed050b61056420357b62a
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Tue Jul 5 14:18:18 2011 +1000

    __pmInitLocks - change initialization
    
    Previously we were using run-time initialization to ensure
    __pmLock_libpcp is a recursive mutex.
    
    As of Ubuntu 11.04 and/or NPTL 2.13 as reported by
        $ getconf GNU_LIBPTHREAD_VERSION
    this was not working, and the mutex was being created as
    a normal mutex, leading to deadlock with out inevitable nested
    lock() calls form the one thread in libpcp.
    
    So changed to compile-time intialization using
        PTHREAD_RECURSIVE_MUTEX_INITIALIZER
    from <pthreads.h> if that macro is defined, else fallback to
    run-time initialization.

commit e062dfda969c77019022f4cff5af27fac055e905
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Fri Jul 1 20:30:49 2011 +1000

    roomtemp PMDA - fix minor make issue
    
    make distclean at the top was not removing libmlan.a



<Prev in Thread] Current Thread [Next in Thread>
  • pcp updates - another milestone for PCP 4.0, Ken McDonell <=