IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8812


Ignore:
Timestamp:
Sep 14, 2006, 12:27:29 PM (20 years ago)
Author:
Paul Price
Message:

Wrapping psMemGetLastId in a mutex.

File:
1 edited

Legend:

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

    r8809 r8812  
    88*  @author Robert Lupton, Princeton University
    99*
    10 *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2006-09-13 21:14:48 $
     10*  @version $Revision: 1.85 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2006-09-14 22:27:29 $
    1212*
    1313*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    291291psMemId psMemGetLastId(void)
    292292{
    293     return memid;
     293    if (safeThreads) {
     294        pthread_mutex_lock(&memIdMutex);
     295    }
     296
     297    psMemId id = memid;
     298
     299    if (safeThreads) {
     300        pthread_mutex_unlock(&memIdMutex);
     301    }
     302
     303    return id;
    294304}
    295305
Note: See TracChangeset for help on using the changeset viewer.