summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c4
-rw-r--r--sys/arch/i386/i386/acpi_machdep.c4
-rw-r--r--sys/sys/cdefs.h8
3 files changed, 11 insertions, 5 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index 16637cbccd1..48230028268 100644
--- a/sys/arch/amd64/amd64/acpi_machdep.c
+++ b/sys/arch/amd64/amd64/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.37 2010/07/01 00:48:48 mlarkin Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.38 2010/07/01 03:22:12 jsg Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -57,7 +57,7 @@ extern u_char acpi_real_mode_resume[], acpi_resume_end[];
extern u_int32_t acpi_pdirpa;
extern paddr_t tramp_pdirpa;
-extern int acpi_savecpu(void);
+extern int acpi_savecpu(void) __returns_twice;
#define ACPI_BIOS_RSDP_WINDOW_BASE 0xe0000
#define ACPI_BIOS_RSDP_WINDOW_SIZE 0x20000
diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c
index 14e811e0ca3..7a6025d652d 100644
--- a/sys/arch/i386/i386/acpi_machdep.c
+++ b/sys/arch/i386/i386/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.31 2010/07/01 00:48:48 mlarkin Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.32 2010/07/01 03:22:12 jsg Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -62,7 +62,7 @@ int haveacpibutusingapm;
extern u_char acpi_real_mode_resume[], acpi_resume_end[];
-extern int acpi_savecpu(void);
+extern int acpi_savecpu(void) __returns_twice;
extern void intr_calculatemasks(void);
#define ACPI_BIOS_RSDP_WINDOW_BASE 0xe0000
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index d4f6a4cc655..1c672893947 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.29 2010/04/30 20:09:35 kettenis Exp $ */
+/* $OpenBSD: cdefs.h,v 1.30 2010/07/01 03:22:12 jsg Exp $ */
/* $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ */
/*
@@ -141,6 +141,12 @@
#define __used __unused /* suppress -Wunused warnings */
#endif
+#if __GNUC_PREREQ__(4, 1)
+#define __returns_twice __attribute__((returns_twice))
+#else
+#define __returns_twice
+#endif
+
/*
* GNU C version 2.96 adds explicit branch prediction so that
* the CPU back-end can hint the processor and also so that