From 6fcd966f3105006ae675fdb1de421ca089734b74 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 9 Feb 2012 23:29:52 +0100 Subject: [PATCH] The `prefetch' module has been removed. In recent years, GCC builtin_prefetch() is much more useful. --- ucw/Makefile | 2 +- ucw/doc/index.txt | 2 -- ucw/prefetch.h | 36 ------------------------------------ 3 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 ucw/prefetch.h diff --git a/ucw/Makefile b/ucw/Makefile index b8ac841b..be1dc3f3 100644 --- a/ucw/Makefile +++ b/ucw/Makefile @@ -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 \ diff --git a/ucw/doc/index.txt b/ucw/doc/index.txt index 30e3a182..ac022ef8 100644 --- a/ucw/doc/index.txt +++ b/ucw/doc/index.txt @@ -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 index e3358ce7..00000000 --- a/ucw/prefetch.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * UCW Library -- Prefetch - * - * (c) 1997--2006 Martin Mares - * - * 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 -- 2.39.2