and defined to silence compile errors on a system where apr_atomic_t is
a structure.
"pos" is read & written with atomic operators, so make it an apr_atomic_t.
"priority" is almost always updated without using atomic operators, so I
assume it doesn't need to be atomic.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95597
13f79535-47bb-0310-9956-
ffa450edef68
apr_os_file_t fd;
long priority; /**< the priority of this entry */
long total_refs; /**< total number of references this entry has had */
- apr_ssize_t pos; /**< the position of this entry in the cache */
+
+#ifdef USE_ATOMICS
+ apr_atomic_t pos; /**< the position of this entry in the cache */
+#else
+ apr_ssize_t pos;
+#endif
+
} mem_cache_object_t;
typedef struct {
cache_object_t *obj = (cache_object_t *)a;
mem_cache_object_t *mobj = obj->vobj;
-#ifdef USE_ATOMICS
- return (long)apr_atomic_read(&mobj->priority);
-#else
return mobj->priority;
-#endif
-
}
static void memcache_inc_frequency(void*a)