PERFORCE change 100888 for review
Wojciech A. Koszek
wkoszek at FreeBSD.org
Fri Jul 7 15:23:09 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100888
Change 100888 by wkoszek at wkoszek_laptop on 2006/07/07 15:22:38
Enable CTASSERT from kern_proc.c because I've found a kinfo_proc
size, which is 816 bytes when cross-compiled for MIPS.
Change KINFO_PROC_SIZE to 816 in sys/sys/user.h, and change
XXXMIPS->XXMIPS marker to leave a hint for people, who might have
problemw with alignments later.
Affected files ...
.. //depot/projects/mips2/src/sys/kern/kern_proc.c#3 edit
.. //depot/projects/mips2/src/sys/sys/user.h#6 edit
Differences ...
==== //depot/projects/mips2/src/sys/kern/kern_proc.c#3 (text+ko) ====
@@ -100,13 +100,7 @@
int kstack_pages = KSTACK_PAGES;
SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, "");
-/*
- * XXXMIPS: Change this until we know what's going on with sizeof(struct
- * kinfo_proc).
- */
-#if 0
CTASSERT(sizeof(struct kinfo_proc) == KINFO_PROC_SIZE);
-#endif
/*
* Initialize global process hashing structures.
@@ -114,7 +108,6 @@
void
procinit()
{
-
sx_init(&allproc_lock, "allproc");
sx_init(&proctree_lock, "proctree");
mtx_init(&ppeers_lock, "p_peers", NULL, MTX_DEF);
==== //depot/projects/mips2/src/sys/sys/user.h#6 (text+ko) ====
@@ -95,10 +95,10 @@
#define KINFO_PROC_SIZE 768
#endif
/*
- * XXXMIPS: I'm not sure, but after cross-compiling my test-case I saw 768.
+ * XXMIPS: After defining a kinfo_proc variable, readelf shows 816.
*/
#ifdef __mips__
-#define KINFO_PROC_SIZE 768
+#define KINFO_PROC_SIZE 816
#endif
#ifdef __powerpc__
#define KINFO_PROC_SIZE 768
More information about the p4-projects
mailing list