From 28a93126d91663af0023090ec6c375bcf2988b0d Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 23 Jul 2008 17:22:33 +0000 Subject: [PATCH] Synchronize some of the machine-independant AMD64 bits. Obtained-from: Jordan Gordeev --- sys/sys/imgact_elf.h | 3 ++- sys/sys/kernel.h | 4 +++- sys/sys/mman.h | 3 ++- sys/sys/proc.h | 3 ++- sys/sys/queue.h | 8 +++++++- sys/sys/systm.h | 6 ++++-- 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 6877a5c581..56f0d57dc6 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/sys/imgact_elf.h,v 1.17.2.1 2000/07/06 22:26:40 obrien Exp $ - * $DragonFly: src/sys/sys/imgact_elf.h,v 1.8 2007/12/12 23:29:20 dillon Exp $ + * $DragonFly: src/sys/sys/imgact_elf.h,v 1.9 2008/07/23 17:22:33 dillon Exp $ */ #ifndef _SYS_IMGACT_ELF_H_ @@ -93,6 +93,7 @@ typedef struct { typedef struct { int brand; const char *compat_3_brand; /* pre Binutils 2.10 method (FBSD 3) */ + int (*match_abi_note)(const Elf_Note *); const char *emul_path; const char *interp_path; struct sysentvec *sysvec; diff --git a/sys/sys/kernel.h b/sys/sys/kernel.h index 9693d08f1f..b9ee707144 100644 --- a/sys/sys/kernel.h +++ b/sys/sys/kernel.h @@ -40,7 +40,7 @@ * * @(#)kernel.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/kernel.h,v 1.63.2.9 2002/07/02 23:00:30 archie Exp $ - * $DragonFly: src/sys/sys/kernel.h,v 1.30 2008/03/07 11:34:21 sephe Exp $ + * $DragonFly: src/sys/sys/kernel.h,v 1.31 2008/07/23 17:22:33 dillon Exp $ */ #ifndef _SYS_KERNEL_H_ @@ -317,6 +317,8 @@ static void __Tunable_ ## var (void *ignored) \ SYSINIT(__Tunable_init_ ## var, SI_BOOT1_TUNABLES, SI_ORDER_MIDDLE, \ __Tunable_ ## var , NULL); +#define TUNABLE_ULONG_FETCH(path, var) kgetenv_ulong((path), (var)) + extern void tunable_quad_init(void *); struct tunable_quad { const char *path; diff --git a/sys/sys/mman.h b/sys/sys/mman.h index b023788dfe..e3f6d80fb6 100644 --- a/sys/sys/mman.h +++ b/sys/sys/mman.h @@ -32,7 +32,7 @@ * * @(#)mman.h 8.2 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/mman.h,v 1.29.2.1 2001/08/25 07:25:43 dillon Exp $ - * $DragonFly: src/sys/sys/mman.h,v 1.8 2006/12/27 20:43:09 dillon Exp $ + * $DragonFly: src/sys/sys/mman.h,v 1.9 2008/07/23 17:22:33 dillon Exp $ */ #ifndef _SYS_MMAN_H_ @@ -141,6 +141,7 @@ #define MINCORE_MODIFIED 0x4 /* Page has been modified by us */ #define MINCORE_REFERENCED_OTHER 0x8 /* Page has been referenced */ #define MINCORE_MODIFIED_OTHER 0x10 /* Page has been modified */ +#define MINCORE_SUPER 0x20 /* Page is a "super" page */ #ifndef _SYS_TYPES_H_ #include diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 7e15a5c385..2944a235ff 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -37,7 +37,7 @@ * * @(#)proc.h 8.15 (Berkeley) 5/19/95 * $FreeBSD: src/sys/sys/proc.h,v 1.99.2.9 2003/06/06 20:21:32 tegge Exp $ - * $DragonFly: src/sys/sys/proc.h,v 1.120 2008/06/28 17:59:47 dillon Exp $ + * $DragonFly: src/sys/sys/proc.h,v 1.121 2008/07/23 17:22:33 dillon Exp $ */ #ifndef _SYS_PROC_H_ @@ -61,6 +61,7 @@ #endif #include #include /* For struct klist */ +#include /* For struct klist */ #include #include #include diff --git a/sys/sys/queue.h b/sys/sys/queue.h index d952f70ff5..a7b3962b82 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -32,7 +32,7 @@ * * @(#)queue.h 8.5 (Berkeley) 8/20/94 * $FreeBSD: src/sys/sys/queue.h,v 1.32.2.7 2002/04/17 14:21:02 des Exp $ - * $DragonFly: src/sys/sys/queue.h,v 1.9 2008/04/14 19:44:18 dillon Exp $ + * $DragonFly: src/sys/sys/queue.h,v 1.10 2008/07/23 17:22:33 dillon Exp $ */ #ifndef _SYS_QUEUE_H_ @@ -380,6 +380,12 @@ struct { \ (var); \ (var) = TAILQ_NEXT((var), field)) +#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ + for ((var) = TAILQ_FIRST((head)); \ + (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ + (var) = (tvar)) + + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ for ((var) = TAILQ_LAST((head), headname); \ (var); \ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 66d7d0a40f..f9501fb1df 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -37,7 +37,7 @@ * * @(#)systm.h 8.7 (Berkeley) 3/29/95 * $FreeBSD: src/sys/sys/systm.h,v 1.111.2.18 2002/12/17 18:04:02 sam Exp $ - * $DragonFly: src/sys/sys/systm.h,v 1.79 2008/07/11 11:59:44 swildner Exp $ + * $DragonFly: src/sys/sys/systm.h,v 1.80 2008/07/23 17:22:33 dillon Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -175,6 +175,7 @@ int log (int, const char *, ...) __printflike(2, 3); void logwakeup (void); void log_console (struct uio *); int kprintf (const char *, ...) __printflike(1, 2); +int kprintf0(const char *, ...) __printflike(1, 2); void krateprintf (struct krate *, const char *, ...) __printflike(2, 3); int ksnprintf (char *, size_t, const char *, ...) __printflike(3, 4); int ksprintf (char *buf, const char *, ...) __printflike(2, 3); @@ -246,6 +247,7 @@ void kfreeenv(char *env); int ktestenv(const char *name); int kgetenv_int (const char *name, int *data); int kgetenv_string (const char *name, char *data, int size); +int kgetenv_ulong(const char *name, unsigned long *data); int kgetenv_quad (const char *name, quad_t *data); extern char *kern_envp; @@ -279,7 +281,7 @@ typedef void timeout_t (void *); /* timeout function type */ * For the alpha arch, some of these functions are static __inline, and * the others should be. */ -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) void setdelayed (void); void setsoftcambio (void); void setsoftcamnet (void); -- 2.41.0