IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 3:09:38 PM (17 years ago)
Author:
eugene
Message:

comment out the mutex spins on the psImages (now handled by the psImage functions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmSubtraction.c

    r21183 r21351  
    213213        return NULL;
    214214    }
    215     if (threaded) {
    216         psMutexLock(image);
    217     }
     215    // XXX if (threaded) {
     216    // XXX     psMutexLock(image);
     217    // XXX }
    218218    psImage *subset = psImageSubset(image, region); // Subset image, to return
    219     if (threaded) {
    220         psMutexUnlock(image);
    221     }
     219    // XXX if (threaded) {
     220    // XXX     psMutexUnlock(image);
     221    // XXX }
    222222    return subset;
    223223}
     
    232232        return;
    233233    }
    234     if (threaded) {
    235         psMutexLock(parent);
    236     }
     234    // XXX if (threaded) {
     235    // XXX     psMutexLock(parent);
     236    // XXX }
    237237    psFree(child);
    238     if (threaded) {
    239         psMutexUnlock(parent);
    240     }
     238    // XXX if (threaded) {
     239    // XXX     psMutexUnlock(parent);
     240    // XXX }
    241241    return;
    242242}
     
    11441144        if (!out1->image) {
    11451145            out1->image = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    1146             if (threaded) {
    1147                 psMutexInit(out1->image);
    1148             }
     1146            // XXX if (threaded) {
     1147            // XXX     psMutexInit(out1->image);
     1148            // XXX }
    11491149        }
    11501150        if (ro1->weight) {
    11511151            if (!out1->weight) {
    11521152                out1->weight = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    1153                 if (threaded) {
    1154                     psMutexInit(out1->weight);
    1155                 }
     1153                // XXX if (threaded) {
     1154                // XXX     psMutexInit(out1->weight);
     1155                // XXX }
    11561156            }
    11571157            psImageInit(out1->weight, 0.0);
     
    11611161        if (!out2->image) {
    11621162            out2->image = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    1163             if (threaded) {
    1164                 psMutexInit(out2->image);
    1165             }
     1163            // XXX if (threaded) {
     1164            // XXX     psMutexInit(out2->image);
     1165            // XXX }
    11661166        }
    11671167        if (ro2->weight) {
    11681168            if (!out2->weight) {
    11691169                out2->weight = psImageAlloc(numCols, numRows, PS_TYPE_F32);
    1170                 if (threaded) {
    1171                     psMutexInit(out2->weight);
    1172                 }
     1170                // XXX if (threaded) {
     1171                // XXX     psMutexInit(out2->weight);
     1172                // XXX }
    11731173            }
    11741174            psImageInit(out2->weight, 0.0);
     
    11771177    psImage *convMask = NULL;           // Convolved mask image (common to inputs 1 and 2)
    11781178    if (subMask) {
    1179         if (threaded) {
    1180             psMutexInit(subMask);
    1181         }
     1179        // XXX if (threaded) {
     1180        // XXX     psMutexInit(subMask);
     1181        // XXX }
    11821182        if (kernels->mode == PM_SUBTRACTION_MODE_1 || kernels->mode == PM_SUBTRACTION_MODE_DUAL) {
    11831183            if (!out1->mask) {
     
    12051205    if (kernels->mode == PM_SUBTRACTION_MODE_1 || kernels->mode == PM_SUBTRACTION_MODE_DUAL) {
    12061206        sys1 = subtractionSysErrImage(ro1->image, sysError);
    1207         if (threaded && sys1) {
    1208             psMutexInit(sys1);
    1209         }
     1207        // XXX if (threaded && sys1) {
     1208        // XXX     psMutexInit(sys1);
     1209        // XXX }
    12101210    }
    12111211    if (kernels->mode == PM_SUBTRACTION_MODE_2 || kernels->mode == PM_SUBTRACTION_MODE_DUAL) {
    12121212        sys2 = subtractionSysErrImage(ro2->image, sysError);
    1213         if (threaded && sys2) {
    1214             psMutexInit(sys2);
    1215         }
     1213        // XXX if (threaded && sys2) {
     1214        // XXX     psMutexInit(sys2);
     1215        // XXX }
    12161216    }
    12171217
     
    12641264                psArrayAdd(args, 1, (pmReadout*)ro2); // Casting away const
    12651265                // Since adding to the array can impact the reference count, we need to lock
    1266                 if (sys1) {
    1267                     psMutexLock(sys1);
    1268                 }
     1266                // XXX if (sys1) {
     1267                // XXX     psMutexLock(sys1);
     1268                // XXX }
    12691269                psArrayAdd(args, 1, sys1);
    1270                 if (sys1) {
    1271                     psMutexUnlock(sys1);
    1272                 }
    1273                 if (sys2) {
    1274                     psMutexLock(sys2);
    1275                 }
     1270                // XXX if (sys1) {
     1271                // XXX     psMutexUnlock(sys1);
     1272                // XXX }
     1273                // XXX if (sys2) {
     1274                // XXX     psMutexLock(sys2);
     1275                // XXX }
    12761276                psArrayAdd(args, 1, sys2);
    1277                 if (sys2) {
    1278                     psMutexUnlock(sys2);
    1279                 }
    1280                 if (subMask) {
    1281                     psMutexLock(subMask);
    1282                 }
     1277                // XXX if (sys2) {
     1278                // XXX     psMutexUnlock(sys2);
     1279                // XXX }
     1280                // XXX if (subMask) {
     1281                // XXX     psMutexLock(subMask);
     1282                // XXX }
    12831283                psArrayAdd(args, 1, subMask);
    1284                 if (subMask) {
    1285                     psMutexUnlock(subMask);
    1286                 }
     1284                // XXX if (subMask) {
     1285                // XXX     psMutexUnlock(subMask);
     1286                // XXX }
    12871287                PS_ARRAY_ADD_SCALAR(args, maskBad, PS_TYPE_IMAGE_MASK);
    12881288                PS_ARRAY_ADD_SCALAR(args, maskPoor, PS_TYPE_IMAGE_MASK);
     
    13241324        }
    13251325
    1326         if (subMask) {
    1327             psMutexDestroy(subMask);
    1328         }
    1329         if (sys1) {
    1330             psMutexDestroy(sys1);
    1331         }
    1332         if (sys2) {
    1333             psMutexDestroy(sys2);
    1334         }
     1326        // XXX if (subMask) {
     1327        // XXX     psMutexDestroy(subMask);
     1328        // XXX }
     1329        // XXX if (sys1) {
     1330        // XXX     psMutexDestroy(sys1);
     1331        // XXX }
     1332        // XXX if (sys2) {
     1333        // XXX     psMutexDestroy(sys2);
     1334        // XXX }
    13351335    }
    13361336
Note: See TracChangeset for help on using the changeset viewer.