IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 20, 2005, 12:42:30 PM (21 years ago)
Author:
drobbin
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psMemory.c

    r4298 r4321  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2005-06-17 21:42:02 $
     10*  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2005-06-20 22:42:30 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    255255}
    256256
    257 psS32 psMemCheckCorruption(psBool abort_on_error)
     257int psMemCheckCorruption(bool abort_on_error)
    258258{
    259259    psS32 nbad = 0;               // number of bad blocks
     
    504504
    505505// return refCounter
    506 psReferenceCount psMemGetRefCounter(psPtr vptr)
    507 {
    508     psMemBlock* ptr;
     506psReferenceCount psMemGetRefCounter(const psPtr ptr)
     507{
     508    psMemBlock* ptr2;
    509509    psU32 refCount;
    510510
    511     if (vptr == NULL) {
     511    if (ptr == NULL) {
    512512        return 0;
    513513    }
    514514
    515     ptr = ((psMemBlock* ) vptr) - 1;
    516 
    517     if (checkMemBlock(ptr, __func__) != 0) {
    518         memProblemCallback(ptr, __func__, __LINE__);
    519     }
    520 
    521     pthread_mutex_lock(&ptr->refCounterMutex);
    522     refCount = ptr->refCounter;
    523     pthread_mutex_unlock(&ptr->refCounterMutex);
     515    ptr2 = ((psMemBlock* ) ptr) - 1;
     516
     517    if (checkMemBlock(ptr2, __func__) != 0) {
     518        memProblemCallback(ptr2, __func__, __LINE__);
     519    }
     520
     521    pthread_mutex_lock(&ptr2->refCounterMutex);
     522    refCount = ptr2->refCounter;
     523    pthread_mutex_unlock(&ptr2->refCounterMutex);
    524524
    525525    return refCount;
Note: See TracChangeset for help on using the changeset viewer.