ftp.nice.ch/pub/next/developer/languages/c/gcc.2.7.2.2.N.b.tar.gz#/lib/gcc-lib/m68k-next-nextstep3/2.7.2.2.f.2/include/bsd/m68k/cpu.h

This is cpu.h in view mode; [Download] [Up]

/*	@(#)cpu.h	1.0	11/09/86	(c) 1986 NeXT	*/

/* 
 * HISTORY
 * 21-May-91  Gregg Kellogg (gk) at NeXT
 *	Public version.
 *
 * 26-Mar-91  Gregg Kellogg (gk) at NeXT
 *	Externallized all variable declarations.
 *
 * 09-Nov-86  John Seamons (jks) at NeXT
 *	Ported to NeXT.
 */ 

/*
 * Copyright (c) 1982, 1986 Regents of the University of California.
 * All rights reserved.  The Berkeley software License Agreement
 * specifies the terms and conditions for redistribution.
 *
 *	@(#)cpu.h	7.1 (Berkeley) 6/5/86
 */
#ifndef	_M68K_CPU_
#define	_M68K_CPU_

#ifndef	ASSEMBLER
/* 
 *  We use these types in the definitions below and hence ought to include them
 *  directly to aid new callers (even if our caller is likely to have already
 *  done so).
 */
#import <bsd/sys/types.h>
#endif

#ifndef	ASSEMBLER
#ifdef	KERNEL_BUILD
#import <cpus.h>
#else
#import <mach/features.h>
#endif
#endif

/*
 * Hardware revisions
 */
#if	KERNEL || STANDALONE

#ifndef	ASSEMBLER
extern u_short	dma_chip;
extern u_char	cpu_rev;
extern u_char	cpu_clk;
extern u_char	machine_type;			/* see scr.h for values */
extern u_char	board_rev;
extern u_char	cpu_type;
extern u_char	mon_rev;
#endif

/* cpu_type values */
#define	MC68030		0
#define	MC68040		1

#endif

#ifndef	ASSEMBLER
#if	NCPUS > 1
static inline int cpu_number(void)
{
	register ret;

	asm volatile ("movc	msp,%0" : "=da" (ret));
	return (ret);
}
#else
#define	cpu_number()		(0)
#endif
#endif
			

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.