⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genassym.c

📁 早期freebsd实现
💻 C
字号:
/*- * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by the University of *	California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors *    may be used to endorse or promote products derived from this software *    without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */#ifndef lintchar copyright[] ="@(#) Copyright (c) 1982, 1986 The Regents of the University of California.\n\ All rights reserved.\n";#endif /* not lint */#ifndef lintstatic char sccsid[] = "@(#)genassym.c	7.12 (Berkeley) 9/23/93";#endif /* not lint */#define KERNEL#define	VAX780	1#define	VAX750	1#define	VAX730	1#define	VAX630	1#define	VAX650	1#include "../include/pte.h"#include "sys/param.h"#include "sys/buf.h"#include "sys/vmmeter.h"#include "sys/vmparam.h"#include "sys/user.h"#include "sys/cmap.h"#include "sys/map.h"#include "../uba/ubareg.h"#include "../uba/ubavar.h"#include "sys/proc.h"#include "sys/text.h"#include "rpb.h"#include "sys/mbuf.h"#include "sys/msgbuf.h"struct uba_hd uba_hd[1];main(){	register struct proc *p = (struct proc *)0;	register struct uba_regs *uba = (struct uba_regs *)0;	register struct uba_hd *uh = (struct uba_hd *)0;	register struct vmmeter *vm = (struct vmmeter *)0;	register struct user *up = (struct user *)0;	register struct rusage *rup = (struct rusage *)0;	struct rpb *rp = (struct rpb *)0;	struct text *tp = (struct text *)0;	printf("#define\tP_FORW %d\n", &p->p_forw);	printf("#define\tP_BACK %d\n", &p->p_back);	printf("#define\tP_XLINK %d\n", &p->p_xlink);	printf("#define\tP_ADDR %d\n", &p->p_addr);	printf("#define\tP_PRIORITY %d\n", &p->p_priority);	printf("#define\tP_STAT %d\n", &p->p_stat);	printf("#define\tP_WCHAN %d\n", &p->p_wchan);	printf("#define\tP_TSIZE %d\n", &p->p_tsize);	printf("#define\tP_DSIZE %d\n", &p->p_dsize);	printf("#define\tP_SSIZE %d\n", &p->p_ssize);	printf("#define\tP_P0BR %d\n", &p->p_p0br);	printf("#define\tP_SZPT %d\n", &p->p_szpt);	printf("#define\tP_TEXTP %d\n", &p->p_textp);	printf("#define\tP_FLAG %d\n", &p->p_flag);	printf("#define\tSSLEEP %d\n", SSLEEP);	printf("#define\tSRUN %d\n", SRUN);	printf("#define\tUBA_BRRVR %d\n", uba->uba_brrvr);	printf("#define\tUH_UBA %d\n", &uh->uh_uba);	printf("#define\tUH_VEC %d\n", &uh->uh_vec);	printf("#define\tUH_SIZE %d\n", sizeof (struct uba_hd));	printf("#define\tRP_FLAG %d\n", &rp->rp_flag);	printf("#define\tX_CADDR %d\n", &tp->x_caddr);	printf("#define\tV_SWTCH %d\n", &vm->v_swtch);	printf("#define\tV_TRAP %d\n", &vm->v_trap);	printf("#define\tV_SYSCALL %d\n", &vm->v_syscall);	printf("#define\tV_INTR %d\n", &vm->v_intr);	printf("#define\tV_SOFT %d\n", &vm->v_soft);	printf("#define\tV_PDMA %d\n", &vm->v_pdma);	printf("#define\tV_FAULTS %d\n", &vm->v_faults);	printf("#define\tV_PGREC %d\n", &vm->v_pgrec);	printf("#define\tV_FASTPGREC %d\n", &vm->v_fastpgrec);	printf("#define\tUPAGES %d\n", UPAGES);	printf("#define\tCLSIZE %d\n", CLSIZE);	printf("#define\tMAXPHYS %d\n", MAXPHYS);	printf("#define\tSYSPTSIZE %d\n", SYSPTSIZE);	printf("#define\tUSRPTSIZE %d\n", USRPTSIZE);	printf("#define\tMSGBUFPTECNT %d\n", btoc(sizeof (struct msgbuf)));	printf("#define\tMCLBYTES %d\n", MCLBYTES);	printf("#define\tNMBCLUSTERS %d\n", NMBCLUSTERS);	printf("#define\tNKMEMCLUSTERS %d\n", NKMEMCLUSTERS);#ifdef SYSVSHM	printf("#define\tSHMMAXPGS %d\n", SHMMAXPGS);#endif	printf("#define\tU_PROCP %d\n", &up->u_procp);	printf("#define\tU_RU %d\n", &up->u_ru);	printf("#define\tRU_MINFLT %d\n", &rup->ru_minflt);	printf("#define\tSZ_CMAP %d\n", sizeof(struct cmap));	exit(0);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -