IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19056


Ignore:
Timestamp:
Aug 13, 2008, 5:18:41 PM (18 years ago)
Author:
Paul Price
Message:

Adding psMutex type (just pthread_mutex_t) to avoid problems associated with plugging mutex under void* in various types. Updated the types that have a dangling 'lock' to use this type.

Location:
trunk/psLib/src
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psImage.h

    r15760 r19056  
    99 * @author Joshua Hoblitt, University of Hawaii
    1010 *
    11  * @version $Revision: 1.96 $ $Name: not supported by cvs2svn $
    12  * @date $Date: 2007-12-07 19:33:19 $
     11 * @version $Revision: 1.97 $ $Name: not supported by cvs2svn $
     12 * @date $Date: 2008-08-14 03:18:41 $
    1313 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1414 */
     
    2424#include "psArray.h"
    2525#include "psConstants.h"
    26 
     26#include "psMutex.h"
    2727
    2828/** Basic image data structure.
     
    5656    psPtr p_rawDataBuffer;             ///< Raw data buffer for Allocating/Freeing Images; private
    5757    psArray* children;                 ///< Children of this region.
    58     void *lock;                        ///< Optional lock for thread safety
     58    psMutex lock;                       ///< Optional lock for thread safety
    5959}
    6060psImage;
  • trunk/psLib/src/mathtypes/psVector.h

    r18311 r19056  
    1010 * @author Joshua Hoblitt, University of Hawaii
    1111 *
    12  * @version $Revision: 1.71 $ $Name: not supported by cvs2svn $
    13  * @date $Date: 2008-06-24 21:32:52 $
     12 * @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
     13 * @date $Date: 2008-08-14 03:18:41 $
    1414 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1515 */
     
    2323#include <stdio.h>
    2424#include "psType.h"
     25#include "psMutex.h"
    2526
    2627/** An vector to support primitive types.
     
    4647        psF64* F64;                    ///< Double-precision float data.
    4748    } data;
    48     void *lock;                        ///< Optional lock for thread safety.
     49    psMutex lock;                       ///< Optional lock for thread safety.
    4950}
    5051psVector;
  • trunk/psLib/src/pslib_strict.h

    r18958 r19056  
    99*  @author Eric Van Alst, MHPCC
    1010*
    11 *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2008-08-08 18:07:49 $
     11*  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2008-08-14 03:18:41 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7474#include "psMinimizePowell.h"
    7575#include "psMinimizePolyFit.h"
     76#include "psMutex.h"
    7677#include "psRandom.h"
    7778#include "psRegionForImage.h"
  • trunk/psLib/src/sys/Makefile.am

    r18827 r19056  
    4141        psLogMsg.h     \
    4242        psMemory.h     \
     43        psMutex.h      \
    4344        psSlurp.h      \
    4445        psString.h     \
  • trunk/psLib/src/types/psArray.h

    r18954 r19056  
    1010 *  @author Joshua Hoblitt, University of Hawaii
    1111 *
    12  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2008-08-08 18:05:34 $
     12 *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2008-08-14 03:18:41 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2222#include "psCompare.h"
    2323#include "psVector.h"
     24#include "psMutex.h"
    2425
    2526/// @addtogroup DataContainer Data Containers
     
    3637    const long nalloc;                 ///< Total number of elements available.
    3738    psPtr* data;                       ///< An Array of pointer elements
    38     void *lock;                        ///< Optional lock for thread safety
     39    psMutex lock;                       ///< Optional lock for thread safety
    3940}
    4041psArray;
  • trunk/psLib/src/types/psBitSet.h

    r14452 r19056  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-08-09 01:40:08 $
     13 *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2008-08-14 03:18:41 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2121
    2222#include "psType.h"
     23#include "psMutex.h"
    2324
    2425/// @addtogroup DataContainer Data Containers
     
    3940    long n;                            ///< Number of bytes in the array
    4041    psU8 *bits;                        ///< Aray of bytes holding bits
    41     void *lock;                        ///< Optional lock for thread safety
     42    psMutex lock;                       ///< Optional lock for thread safety
    4243}
    4344psBitSet;
  • trunk/psLib/src/types/psHash.h

    r14452 r19056  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-08-09 01:40:08 $
     13 *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2008-08-14 03:18:41 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2424
    2525#include "psList.h"
     26#include "psMutex.h"
    2627
    2728/** A bucket that holds an item of data. */
     
    4243    long n;                            ///< Number of buckets in hash table.
    4344    psHashBucket* *buckets;            ///< The bucket data.
    44     void *lock;                        ///< Optional lock for thread safety.
     45    psMutex lock;                       ///< Optional lock for thread safety.
    4546}
    4647psHash;
  • trunk/psLib/src/types/psList.h

    r18955 r19056  
    55 *  @author Robert Daniel DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2008-08-08 18:06:27 $
     7 *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2008-08-14 03:18:41 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    1616#include "psCompare.h"
    1717#include "psArray.h"
     18#include "psMutex.h"
    1819
    1920/// @addtogroup DataContainer Data Containers
     
    5455    ///< used internally to improve performance when using indexed access, all
    5556    ///< others are user-level iterators created by psListIteratorAlloc.
    56     void *lock;                        ///< Optional lock for thread safety
     57    psMutex lock;                       ///< Optional lock for thread safety
    5758} psList;
    5859
  • trunk/psLib/src/types/psMetadata.h

    r17515 r19056  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2008-05-05 00:09:04 $
     11*  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2008-08-14 03:18:41 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2929#include "psTime.h"
    3030#include "psLookupTable.h"
     31#include "psMutex.h"
    3132
    3233#define PS_DATA_IS_PRIMITIVE(TYPE) \
     
    5758 */
    5859typedef enum {
    59     PS_META_DEFAULT       = 0,          ///< default behaviour (duplicate entry is an error)
    60     PS_META_REPLACE       = 0x01000000, ///< allow entry to be replaced
    61     PS_META_NO_REPLACE    = 0x02000000, ///< duplicate entry is silently skipped
    62     PS_META_DUPLICATE_OK  = 0x04000000, ///< allow duplicate entries
    63     PS_META_UPDATE_FOLDER = 0x08000000, ///< for a metadata folder, merge contents with existing md
    64     PS_META_NULL          = 0x10000000, ///< psMetadataItem.data is a NULL value
    65     PS_META_REQUIRE_ENTRY = 0x20000000, ///< require pre-existing entry with same name
    66     PS_META_REQUIRE_TYPE  = 0x40000000  ///< require pre-existing entry to have same type
     60    PS_META_DEFAULT       = 0,          ///< default behaviour (duplicate entry is an error)
     61    PS_META_REPLACE       = 0x01000000, ///< allow entry to be replaced
     62    PS_META_NO_REPLACE    = 0x02000000, ///< duplicate entry is silently skipped
     63    PS_META_DUPLICATE_OK  = 0x04000000, ///< allow duplicate entries
     64    PS_META_UPDATE_FOLDER = 0x08000000, ///< for a metadata folder, merge contents with existing md
     65    PS_META_NULL          = 0x10000000, ///< psMetadataItem.data is a NULL value
     66    PS_META_REQUIRE_ENTRY = 0x20000000, ///< require pre-existing entry with same name
     67    PS_META_REQUIRE_TYPE  = 0x40000000  ///< require pre-existing entry to have same type
    6768} psMetadataFlags;
    6869
     
    8384    psList*  list;                     ///< Metadata in linked-list
    8485    psHash*  hash;                     ///< Metadata in a hash table
    85     void *lock;                        ///< Optional lock for thread safety
     86    psMutex lock;                       ///< Optional lock for thread safety
    8687}
    8788psMetadata;
  • trunk/psLib/src/types/psPixels.h

    r14452 r19056  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-08-09 01:40:08 $
     8 *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2008-08-14 03:18:41 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    4545    const long nalloc;                 ///< Number allocated
    4646    psPixelCoord* data;                ///< The pixel coordinates
    47     void *lock;                        ///< Option lock for thread safety
     47    psMutex lock;                       ///< Option lock for thread safety
    4848}
    4949psPixels;
Note: See TracChangeset for help on using the changeset viewer.