(void) AcquireMagickResource(FileResource,1);
cache_info->file=file;
cache_info->mode=mode;
- cache_info->timestamp=time(0);
UnlockSemaphoreInfo(cache_info->disk_semaphore);
return(MagickTrue);
}
-static inline MagickOffsetType ReadPixelCacheRegion(CacheInfo *cache_info,
- const MagickOffsetType offset,const MagickSizeType length,
- unsigned char *restrict buffer)
+static inline MagickOffsetType ReadPixelCacheRegion(
+ const CacheInfo *restrict cache_info,const MagickOffsetType offset,
+ const MagickSizeType length,unsigned char *restrict buffer)
{
register MagickOffsetType
i;
ssize_t
count;
- cache_info->timestamp=time(0);
#if !defined(MAGICKCORE_HAVE_PREAD)
LockSemaphoreInfo(cache_info->disk_semaphore);
if (lseek(cache_info->file,offset,SEEK_SET) < 0)
return(i);
}
-static inline MagickOffsetType WritePixelCacheRegion(CacheInfo *cache_info,
- const MagickOffsetType offset,const MagickSizeType length,
- const unsigned char *restrict buffer)
+static inline MagickOffsetType WritePixelCacheRegion(
+ const CacheInfo *restrict cache_info,const MagickOffsetType offset,
+ const MagickSizeType length,const unsigned char *restrict buffer)
{
register MagickOffsetType
i;
ssize_t
count;
- cache_info->timestamp=time(0);
#if !defined(MAGICKCORE_HAVE_PWRITE)
LockSemaphoreInfo(cache_info->disk_semaphore);
if (lseek(cache_info->file,offset,SEEK_SET) < 0)
*/
static inline MagickBooleanType IsPixelAuthentic(
- const CacheInfo *restrict cache_info,NexusInfo *nexus_info)
+ const CacheInfo *restrict cache_info,const NexusInfo *restrict nexus_info)
{
MagickBooleanType
status;
%
*/
-static inline MagickBooleanType ValidatePixelCacheMorphology(const Image *image)
+static inline MagickBooleanType ValidatePixelCacheMorphology(
+ const Image *restrict image)
{
- CacheInfo
- *cache_info;
+ const CacheInfo
+ *restrict cache_info;
- PixelChannelMap
- *p,
- *q;
+ const PixelChannelMap
+ *restrict p,
+ *restrict q;
/*
Does the image match the pixel cache morphology?
%
*/
-static inline MagickBooleanType AcquireCacheNexusPixels(CacheInfo *cache_info,
- NexusInfo *nexus_info,ExceptionInfo *exception)
+static inline MagickBooleanType AcquireCacheNexusPixels(
+ const CacheInfo *restrict cache_info,NexusInfo *nexus_info,
+ ExceptionInfo *exception)
{
if (nexus_info->length != (MagickSizeType) ((size_t) nexus_info->length))
return(MagickFalse);