]> mj.ucw.cz Git - libucw.git/commitdiff
The `prefetch' module has been removed.
authorMartin Mares <mj@ucw.cz>
Thu, 9 Feb 2012 22:29:52 +0000 (23:29 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 9 Feb 2012 22:29:52 +0000 (23:29 +0100)
In recent years, GCC builtin_prefetch() is much more useful.

ucw/Makefile
ucw/doc/index.txt
ucw/prefetch.h [deleted file]

index b8ac841b2fc25f5fcbbb6a7d9de0f21155be4cff..be1dc3f34fd06b961d31fedf1cfe4fda4ed2eea2 100644 (file)
@@ -40,7 +40,7 @@ LIBUCW_MAIN_INCLUDES= \
        clists.h slists.h simple-lists.h \
        string.h stkstring.h unicode.h chartype.h regex.h \
        wildmatch.h \
-       unaligned.h prefetch.h \
+       unaligned.h \
        bbuf.h gbuf.h gary.h bitarray.h bitsig.h \
        hashfunc.h hashtable.h \
        heap.h binheap.h binheap-node.h \
index 30e3a18257242045540b9b5ae710c79f68c1d2a4..ac022ef8cae9c1c66f385a4bf76b176c57ee8a00 100644 (file)
@@ -70,8 +70,6 @@ Yet undocumented modules
 - Address manipulation
   * `url.h`
   * `ipaccess.h`
-- Prefetching of memory
-  * `prefetch.h`
 - Caches
   * `qache.h`
 - Threads
diff --git a/ucw/prefetch.h b/ucw/prefetch.h
deleted file mode 100644 (file)
index e3358ce..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *     UCW Library -- Prefetch
- *
- *     (c) 1997--2006 Martin Mares <mj@ucw.cz>
- *
- *     This software may be freely distributed and used according to the terms
- *     of the GNU Lesser General Public License.
- */
-
-#ifndef _UCW_PREFETCH_H
-#define _UCW_PREFETCH_H
-
-#if defined(__k6)
-  /* K6 doesn't have prefetches */
-
-#elif defined(__athlon) || defined(__k8) || \
-      defined(__i686) || \
-      defined(__pentium4) || defined(__prescott) || defined(__nocona)
-
-#define HAVE_PREFETCH
-static inline void prefetch(void *addr)
-{
-  asm volatile ("prefetcht0 %0" : : "m" (*(byte*)addr));
-}
-
-#else
-#warning "Don't know how to prefetch on your CPU. Please fix ucw/prefetch.h."
-#endif
-
-#ifndef HAVE_PREFETCH
-static inline void prefetch(void *addr UNUSED)
-{
-}
-#endif
-
-#endif