syncicache.c (253750) | syncicache.c (298120) |
---|---|
1/*- 2 * Copyright (C) 1995-1997, 1999 Wolfgang Solfrank. 3 * Copyright (C) 1995-1997, 1999 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ 32 */ 33 34#ifndef lint 35static const char rcsid[] = | 1/*- 2 * Copyright (C) 1995-1997, 1999 Wolfgang Solfrank. 3 * Copyright (C) 1995-1997, 1999 TooLs GmbH. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 19 unchanged lines hidden (view full) --- 28 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 29 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * 31 * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ 32 */ 33 34#ifndef lint 35static const char rcsid[] = |
36 "$FreeBSD: head/lib/libc/powerpc/gen/syncicache.c 253750 2013-07-28 18:44:17Z avg $"; | 36 "$FreeBSD: head/lib/libc/powerpc/gen/syncicache.c 298120 2016-04-16 17:52:00Z pfg $"; |
37#endif /* not lint */ 38 39#include <sys/param.h> 40#if defined(_KERNEL) || defined(_STANDALONE) 41#include <sys/time.h> 42#include <sys/proc.h> 43#include <vm/vm.h> 44#endif --- 16 unchanged lines hidden (view full) --- 61static void 62getcachelinesize() 63{ 64 static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE }; 65 int clen; 66 67 clen = sizeof(cacheline_size); 68 | 37#endif /* not lint */ 38 39#include <sys/param.h> 40#if defined(_KERNEL) || defined(_STANDALONE) 41#include <sys/time.h> 42#include <sys/proc.h> 43#include <vm/vm.h> 44#endif --- 16 unchanged lines hidden (view full) --- 61static void 62getcachelinesize() 63{ 64 static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE }; 65 int clen; 66 67 clen = sizeof(cacheline_size); 68 |
69 if (sysctl(cachemib, sizeof(cachemib) / sizeof(cachemib[0]), 70 &cacheline_size, &clen, NULL, 0) < 0 || !cacheline_size) { | 69 if (sysctl(cachemib, nitems(cachemib), &cacheline_size, &clen, 70 NULL, 0) < 0 || !cacheline_size) { |
71 abort(); 72 } 73} 74#endif 75 76void 77__syncicache(void *from, int len) 78{ --- 25 unchanged lines hidden --- | 71 abort(); 72 } 73} 74#endif 75 76void 77__syncicache(void *from, int len) 78{ --- 25 unchanged lines hidden --- |