count;
#if !defined(MAGICKCORE_HAVE_PWRITE)
+ LockSemaphoreInfo(matrix_info->semaphore);
if (lseek(matrix_info->file,offset,SEEK_SET) < 0)
- return((MagickOffsetType) -1);
+ {
+ UnlockSemaphoreInfo(matrix_info->semaphore);
+ return((MagickOffsetType) -1);
+ }
#endif
count=0;
for (i=0; i < (MagickOffsetType) length; i+=count)
break;
}
}
+#if !defined(MAGICKCORE_HAVE_PWRITE)
+ UnlockSemaphoreInfo(matrix_info->semaphore);
+#endif
return(i);
}
count;
#if !defined(MAGICKCORE_HAVE_PREAD)
+ LockSemaphoreInfo(matrix_info->semaphore);
if (lseek(matrix_info->file,offset,SEEK_SET) < 0)
- return((MagickOffsetType) -1);
+ {
+ UnlockSemaphoreInfo(matrix_info->semaphore);
+ return((MagickOffsetType) -1);
+ }
#endif
count=0;
for (i=0; i < (MagickOffsetType) length; i+=count)
break;
}
}
+#if !defined(MAGICKCORE_HAVE_PREAD)
+ UnlockSemaphoreInfo(matrix_info->semaphore);
+#endif
return(i);
}
matrix_info->stride,matrix_info->stride);
return(MagickTrue);
}
- LockSemaphoreInfo(matrix_info->semaphore);
count=ReadMatrixElements(matrix_info,i*matrix_info->stride,
matrix_info->stride,value);
- UnlockSemaphoreInfo(matrix_info->semaphore);
if (count != (MagickOffsetType) matrix_info->stride)
return(MagickFalse);
return(MagickTrue);
matrix_info->stride,value,matrix_info->stride);
return(MagickTrue);
}
- LockSemaphoreInfo(matrix_info->semaphore);
count=WriteMatrixElements(matrix_info,i*matrix_info->stride,
matrix_info->stride,value);
- UnlockSemaphoreInfo(matrix_info->semaphore);
if (count != (MagickOffsetType) matrix_info->stride)
return(MagickFalse);
return(MagickTrue);