]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 8 May 2012 18:38:18 +0000 (18:38 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 8 May 2012 18:38:18 +0000 (18:38 +0000)
MagickCore/cache-private.h
MagickCore/cache.c

index a6be29f9225ca44fa1ecf578c1d755569ac07ec2..466848e6458d58588708c7fa05a81b4422f04d6c 100644 (file)
@@ -192,9 +192,6 @@ typedef struct _CacheInfo
     *semaphore,
     *disk_semaphore;
 
-  time_t
-    timestamp;
-
   size_t
     signature;
 } CacheInfo;
index 2b754247f35caae2ea9c67d6c849e712f128adc3..7c63ea25730ef6da8a8228e1c544f0cb9e1958c4 100644 (file)
@@ -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);