svn commit: r207793 - in stable/8/sys: amd64/include arm/include
i386/include ia64/include kern mips/include powerpc/include
sparc64/include sun4v/include sys
Konstantin Belousov
kib at FreeBSD.org
Sat May 8 18:54:48 UTC 2010
Author: kib
Date: Sat May 8 18:54:47 2010
New Revision: 207793
URL: http://svn.freebsd.org/changeset/base/207793
Log:
MFC r204051 (by imp):
n64 has a different size for KINFO_PROC_SIZE.
Approved by: imp
MFC r207152:
Move the constants specifying the size of struct kinfo_proc into
machine-specific header files. Add KINFO_PROC32_SIZE for struct
kinfo_proc32 for architectures providing COMPAT_FREEBSD32. Add
CTASSERT for the size of struct kinfo_proc32.
MFC r207269:
Style: use #define<TAB> instead of #define<SPACE>.
Modified:
stable/8/sys/amd64/include/proc.h
stable/8/sys/arm/include/proc.h
stable/8/sys/i386/include/proc.h
stable/8/sys/ia64/include/proc.h
stable/8/sys/kern/kern_proc.c
stable/8/sys/mips/include/proc.h
stable/8/sys/powerpc/include/proc.h
stable/8/sys/sparc64/include/proc.h
stable/8/sys/sun4v/include/proc.h
stable/8/sys/sys/user.h
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/geom/sched/ (props changed)
Modified: stable/8/sys/amd64/include/proc.h
==============================================================================
--- stable/8/sys/amd64/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/amd64/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -53,6 +53,9 @@ struct mdproc {
struct system_segment_descriptor md_ldt_sd;
};
+#define KINFO_PROC_SIZE 1088
+#define KINFO_PROC32_SIZE 768
+
#ifdef _KERNEL
/* Get the current kernel thread stack usage. */
Modified: stable/8/sys/arm/include/proc.h
==============================================================================
--- stable/8/sys/arm/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/arm/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -60,4 +60,6 @@ struct mdproc {
void *md_sigtramp;
};
+#define KINFO_PROC_SIZE 792
+
#endif /* !_MACHINE_PROC_H_ */
Modified: stable/8/sys/i386/include/proc.h
==============================================================================
--- stable/8/sys/i386/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/i386/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -57,6 +57,8 @@ struct mdproc {
struct proc_ldt *md_ldt; /* (t) per-process ldt */
};
+#define KINFO_PROC_SIZE 768
+
#ifdef _KERNEL
/* Get the current kernel thread stack usage. */
Modified: stable/8/sys/ia64/include/proc.h
==============================================================================
--- stable/8/sys/ia64/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/ia64/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -38,4 +38,7 @@ struct mdproc {
int __dummy; /* Avoid having an empty struct. */
};
+#define KINFO_PROC_SIZE 1088
+#define KINFO_PROC32_SIZE 768
+
#endif /* !_MACHINE_PROC_H_ */
Modified: stable/8/sys/kern/kern_proc.c
==============================================================================
--- stable/8/sys/kern/kern_proc.c Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/kern/kern_proc.c Sat May 8 18:54:47 2010 (r207793)
@@ -151,6 +151,9 @@ int kstack_pages = KSTACK_PAGES;
SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "");
CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE);
+#ifdef COMPAT_FREEBSD32
+CTASSERT(sizeof(struct kinfo_proc32) == KINFO_PROC32_SIZE);
+#endif
/*
* Initialize global process hashing structures.
Modified: stable/8/sys/mips/include/proc.h
==============================================================================
--- stable/8/sys/mips/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/mips/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -68,4 +68,10 @@ struct thread;
void mips_cpu_switch(struct thread *, struct thread *, struct mtx *);
void mips_cpu_throw(struct thread *, struct thread *);
+#ifdef __mips_n64
+#define KINFO_PROC_SIZE 1088
+#else
+#define KINFO_PROC_SIZE 816
+#endif
+
#endif /* !_MACHINE_PROC_H_ */
Modified: stable/8/sys/powerpc/include/proc.h
==============================================================================
--- stable/8/sys/powerpc/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/powerpc/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -46,4 +46,6 @@ struct mdthread {
struct mdproc {
};
+#define KINFO_PROC_SIZE 768
+
#endif /* !_MACHINE_PROC_H_ */
Modified: stable/8/sys/sparc64/include/proc.h
==============================================================================
--- stable/8/sys/sparc64/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/sparc64/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -51,4 +51,6 @@ struct mdproc {
void *md_sigtramp;
};
+#define KINFO_PROC_SIZE 1088
+
#endif /* !_MACHINE_PROC_H_ */
Modified: stable/8/sys/sun4v/include/proc.h
==============================================================================
--- stable/8/sys/sun4v/include/proc.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/sun4v/include/proc.h Sat May 8 18:54:47 2010 (r207793)
@@ -51,4 +51,6 @@ struct mdproc {
void *md_sigtramp;
};
+#define KINFO_PROC_SIZE 1088
+
#endif /* !_MACHINE_PROC_H_ */
Modified: stable/8/sys/sys/user.h
==============================================================================
--- stable/8/sys/sys/user.h Sat May 8 16:47:33 2010 (r207792)
+++ stable/8/sys/sys/user.h Sat May 8 18:54:47 2010 (r207793)
@@ -87,30 +87,11 @@
#define KI_NSPARE_LONG 12
#define KI_NSPARE_PTR 7
-#ifdef __amd64__
-#define KINFO_PROC_SIZE 1088
-#endif
-#ifdef __arm__
-#define KINFO_PROC_SIZE 792
-#endif
-#ifdef __ia64__
-#define KINFO_PROC_SIZE 1088
-#endif
-#ifdef __i386__
-#define KINFO_PROC_SIZE 768
-#endif
-#ifdef __mips__
-#define KINFO_PROC_SIZE 816
-#endif
-#ifdef __powerpc__
-#define KINFO_PROC_SIZE 768
-#endif
-#ifdef __sparc64__
-#define KINFO_PROC_SIZE 1088
-#endif
+#ifndef _KERNEL
#ifndef KINFO_PROC_SIZE
#error "Unknown architecture"
#endif
+#endif /* !_KERNEL */
#define WMESGLEN 8 /* size of returned wchan message */
#define LOCKNAMELEN 8 /* size of returned lock name */
More information about the svn-src-stable-8
mailing list