Module Name: src Committed By: jruoho Date: Sat Jul 10 19:37:38 UTC 2010
Modified Files: src/sys/dev/acpi: acpi_timer.c acpi_timer.h Log Message: Export also the delta function. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/dev/acpi/acpi_timer.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpi_timer.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/acpi/acpi_timer.c diff -u src/sys/dev/acpi/acpi_timer.c:1.17 src/sys/dev/acpi/acpi_timer.c:1.18 --- src/sys/dev/acpi/acpi_timer.c:1.17 Sat Jul 10 13:08:09 2010 +++ src/sys/dev/acpi/acpi_timer.c Sat Jul 10 19:37:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_timer.c,v 1.17 2010/07/10 13:08:09 jruoho Exp $ */ +/* $NetBSD: acpi_timer.c,v 1.18 2010/07/10 19:37:38 jruoho Exp $ */ /*- * Copyright (c) 2006 Matthias Drochner <droch...@netbsd.org> @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_timer.c,v 1.17 2010/07/10 13:08:09 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_timer.c,v 1.18 2010/07/10 19:37:38 jruoho Exp $"); #include <sys/types.h> #include <sys/systm.h> @@ -40,7 +40,6 @@ #include <machine/acpi_machdep.h> static int acpitimer_test(void); -static uint32_t acpitimer_delta(uint32_t, uint32_t); static struct timecounter acpi_timecounter = { acpitimer_read_safe, @@ -63,7 +62,7 @@ res = AcpiGetTimerResolution(&bits); if (res != AE_OK) - return (-1); + return -1; if (bits == 32) acpi_timecounter.tc_counter_mask = 0xffffffff; @@ -103,8 +102,8 @@ } /* - * Some chipsets (PIIX4 variants) do not latch correctly; there - * is a chance that a transition is hit. + * Some chipsets (PIIX4 variants) do not latch correctly; + * there is a chance that a transition is hit. */ u_int acpitimer_read_safe(struct timecounter *tc) @@ -125,7 +124,7 @@ return t2; } -static uint32_t +uint32_t acpitimer_delta(uint32_t end, uint32_t start) { const u_int mask = acpi_timecounter.tc_counter_mask; Index: src/sys/dev/acpi/acpi_timer.h diff -u src/sys/dev/acpi/acpi_timer.h:1.5 src/sys/dev/acpi/acpi_timer.h:1.6 --- src/sys/dev/acpi/acpi_timer.h:1.5 Sat Jul 10 13:08:09 2010 +++ src/sys/dev/acpi/acpi_timer.h Sat Jul 10 19:37:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_timer.h,v 1.5 2010/07/10 13:08:09 jruoho Exp $ */ +/* $NetBSD: acpi_timer.h,v 1.6 2010/07/10 19:37:38 jruoho Exp $ */ /*- * Copyright (c) 2006 Matthias Drochner <droch...@netbsd.org> @@ -29,9 +29,10 @@ #ifndef _SYS_DEV_ACPI_ACPI_TIMER_H #define _SYS_DEV_ACPI_ACPI_TIMER_H -int acpitimer_init(struct acpi_softc *); -int acpitimer_detach(void); -u_int acpitimer_read_safe(struct timecounter *); -u_int acpitimer_read_fast(struct timecounter *); +int acpitimer_init(struct acpi_softc *); +int acpitimer_detach(void); +u_int acpitimer_read_safe(struct timecounter *); +u_int acpitimer_read_fast(struct timecounter *); +uint32_t acpitimer_delta(uint32_t, uint32_t); #endif /* !_SYS_DEV_ACPI_ACPI_TIMER_H */