From: cristy Date: Tue, 8 May 2012 18:38:18 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~5630 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1832799fa7ee00b4e24b1711fa99cf0c07358fb;p=imagemagick --- diff --git a/MagickCore/cache-private.h b/MagickCore/cache-private.h index a6be29f92..466848e64 100644 --- a/MagickCore/cache-private.h +++ b/MagickCore/cache-private.h @@ -192,9 +192,6 @@ typedef struct _CacheInfo *semaphore, *disk_semaphore; - time_t - timestamp; - size_t signature; } CacheInfo; diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 2b754247f..7c63ea257 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -515,14 +515,13 @@ static MagickBooleanType OpenPixelCacheOnDisk(CacheInfo *cache_info, (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; @@ -530,7 +529,6 @@ static inline MagickOffsetType ReadPixelCacheRegion(CacheInfo *cache_info, 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) @@ -564,9 +562,9 @@ static inline MagickOffsetType ReadPixelCacheRegion(CacheInfo *cache_info, 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; @@ -574,7 +572,6 @@ static inline MagickOffsetType WritePixelCacheRegion(CacheInfo *cache_info, 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) @@ -1495,7 +1492,7 @@ static void *GetAuthenticMetacontentFromCache(const Image *image) */ static inline MagickBooleanType IsPixelAuthentic( - const CacheInfo *restrict cache_info,NexusInfo *nexus_info) + const CacheInfo *restrict cache_info,const NexusInfo *restrict nexus_info) { MagickBooleanType status; @@ -1831,14 +1828,15 @@ MagickExport MagickSizeType GetImageExtent(const Image *image) % */ -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? @@ -4730,8 +4728,9 @@ MagickPrivate void SetPixelCacheMethods(Cache cache,CacheMethods *cache_methods) % */ -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);