2002-08-01 Joel Sherrill <joel@OARcorp.com>

* machine/param.h, sys/syslimits.h: In the continued effort to
	eliminate .h conflicts between newlib and RTEMS, these were moved to
	newlib.
	* machine/Makefile.am, sys/Makefile.am: Reflect above.
This commit is contained in:
Joel Sherrill
2002-08-02 00:48:03 +00:00
parent 6c243f1103
commit d9ab6d3b31
5 changed files with 9 additions and 180 deletions

View File

@@ -1,3 +1,10 @@
2002-08-01 Joel Sherrill <joel@OARcorp.com>
* machine/param.h, sys/syslimits.h: In the continued effort to
eliminate .h conflicts between newlib and RTEMS, these were moved to
newlib.
* machine/Makefile.am, sys/Makefile.am: Reflect above.
2002-08-01 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* wrapup/Makefile.am: Don't install.

View File

@@ -5,8 +5,7 @@
include_machinedir = $(includedir)/machine
include_machine_HEADERS = conf.h cpu.h cpufunc.h endian.h in_cksum.h limits.h \
param.h vmparam.h
include_machine_HEADERS = conf.h cpu.h cpufunc.h endian.h in_cksum.h vmparam.h
PREINSTALL_FILES = $(PROJECT_INCLUDE)/machine \
$(include_machine_HEADERS:%=$(PROJECT_INCLUDE)/machine/%)

View File

@@ -1,92 +0,0 @@
/*
* $Id$
*/
#ifndef _MACHINE_PARAM_H_
#define _MACHINE_PARAM_H_
/*
* These aren't really machine-dependent for RTEMS.....
*/
/*
#define MACHINE "i386"
#define MID_MACHINE MID_I386
*/
/*
* Round p (pointer or byte index) up to a correctly-aligned value
* for all data types (int, long, ...). The result is unsigned int
* and must be cast to any desired pointer type.
*/
#define ALIGNBYTES (sizeof(int) - 1)
#define ALIGN(p) (((unsigned)(p) + ALIGNBYTES) & ~ALIGNBYTES)
#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */
#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */
#define PAGE_MASK (PAGE_SIZE-1)
#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
#define PDRSHIFT 22 /* LOG2(NBPDR) */
#define NBPDR (1<<PDRSHIFT) /* bytes/page dir */
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#define DEV_BSIZE (1<<DEV_BSHIFT)
#define BLKDEV_IOSIZE 2048
#define MAXPHYS (64 * 1024) /* max raw I/O transfer size */
#define UPAGES 2 /* pages of u-area */
/*
* Constants related to network buffer management.
* MCLBYTES must be no larger than CLBYTES (the software page size), and,
* on machines that exchange pages of input or output buffers with mbuf
* clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple
* of the hardware page size.
*/
#ifndef MSIZE
#define MSIZE 128 /* size of an mbuf */
#endif /* MSIZE */
#ifndef MCLSHIFT
#define MCLSHIFT 11 /* convert bytes to m_buf clusters */
#endif /* MCLSHIFT */
#define MCLBYTES (1 << MCLSHIFT) /* size of an m_buf cluster */
#define MCLOFSET (MCLBYTES - 1) /* offset within an m_buf cluster */
/*
* Some macros for units conversion
*/
/* clicks to bytes */
#define ctob(x) ((x)<<PAGE_SHIFT)
/* bytes to clicks */
#define btoc(x) (((unsigned)(x)+PAGE_MASK)>>PAGE_SHIFT)
/*
* btodb() is messy and perhaps slow because `bytes' may be an off_t. We
* want to shift an unsigned type to avoid sign extension and we don't
* want to widen `bytes' unnecessarily. Assume that the result fits in
* a daddr_t.
*/
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
(sizeof (bytes) > sizeof(long) \
? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
: (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
((off_t)(db) << DEV_BSHIFT)
/*
* Mach derived conversion macros
*/
#define trunc_page(x) ((unsigned)(x) & ~PAGE_MASK)
#define round_page(x) ((((unsigned)(x)) + PAGE_MASK) & ~PAGE_MASK)
#define atop(x) ((unsigned)(x) >> PAGE_SHIFT)
#define ptoa(x) ((unsigned)(x) << PAGE_SHIFT)
#endif /* !_MACHINE_PARAM_H_ */

View File

@@ -7,7 +7,7 @@ include_sysdir = $(includedir)/sys
include_sys_HEADERS = buf.h callout.h conf.h domain.h kernel.h libkern.h \
malloc.h mbuf.h mount.h proc.h protosw.h queue.h reboot.h \
resourcevar.h rtprio.h select.h signalvar.h socket.h socketvar.h \
sysctl.h syslimits.h syslog.h systm.h ttydefaults.h ucred.h \
sysctl.h syslog.h systm.h ttydefaults.h ucred.h \
uio.h un.h
PREINSTALL_FILES = $(PROJECT_INCLUDE)/sys \

View File

@@ -1,85 +0,0 @@
/*
* Copyright (c) 1988, 1993
* 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.
*
* @(#)syslimits.h 8.1 (Berkeley) 6/2/93
* $Id$
*/
#ifndef _SYS_SYSLIMITS_H_
#define _SYS_SYSLIMITS_H_
#if !defined(__rtems__)
#define ARG_MAX 65536 /* max bytes for an exec function */
#endif
#if !defined(__rtems__)
#ifndef CHILD_MAX
#define CHILD_MAX 40 /* max simultaneous processes */
#endif
#endif
#if !defined(__rtems__)
#define LINK_MAX 32767 /* max file link count */
#endif
#define MAX_CANON 255 /* max bytes in term canon input line */
#define MAX_INPUT 255 /* max bytes in terminal input */
#if !defined(__rtems__)
#define NAME_MAX 255 /* max bytes in a file name */
#endif
#define NGROUPS_MAX 16 /* max supplemental group id's */
#if !defined(__rtems__)
#ifndef OPEN_MAX
#define OPEN_MAX 64 /* max open files per process */
#endif
#endif
#if !defined(__rtems__)
#define PATH_MAX 1024 /* max bytes in pathname */
#endif
#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */
#define BC_DIM_MAX 2048 /* max array elements in bc(1) */
#define BC_SCALE_MAX 99 /* max scale value in bc(1) */
#define BC_STRING_MAX 1000 /* max const string length in bc(1) */
#define COLL_WEIGHTS_MAX 0 /* max weights for order keyword */
#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */
#define LINE_MAX 2048 /* max bytes in an input line */
#define RE_DUP_MAX 255 /* max RE's in interval notation */
#endif