Ignore:
Timestamp:
Jun 23, 2005, 8:00:41 AM (20 years ago)
Author:
bird
Message:

Updated sys/stat.h, sys/resource.h and sys/_types.h to FreeBSD 5.3 level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/sys/resource.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r2059 r2060  
    1111 *    notice, this list of conditions and the following disclaimer in the
    1212 *    documentation and/or other materials provided with the distribution.
    13  * 3. All advertising materials mentioning features or use of this software
    14  *    must display the following acknowledgement:
    15  *      This product includes software developed by the University of
    16  *      California, Berkeley and its contributors.
    1713 * 4. Neither the name of the University nor the names of its contributors
    1814 *    may be used to endorse or promote products derived from this software
     
    3228 *
    3329 *      @(#)resource.h  8.4 (Berkeley) 1/9/95
    34  * $FreeBSD: src/sys/sys/resource.h,v 1.19 2003/02/16 13:30:29 phk Exp $
     30 * $FreeBSD: src/sys/sys/resource.h,v 1.23 2004/06/13 22:07:58 das Exp $
    3531 */
    3632
    3733/** @file
    38  * FreeBSD 5.1
     34 * FreeBSD 5.3
    3935 * @changed bird: get/setpriority takes id_t not int according to SuS.
    4036 */
     
    4339#define _SYS_RESOURCE_H_
    4440
     41#include <sys/cdefs.h>
     42#include <sys/_timeval.h>
     43#include <sys/_types.h>
     44
    4545/*
    4646 * Process priority specifications to get/setpriority.
     
    4848#define PRIO_MIN        -20
    4949#define PRIO_MAX        20
    50 #ifdef _KERNEL
    51 #define PRIO_TOTAL      (PRIO_MAX - PRIO_MIN)
    52 #endif /* _KERNEL */
    5350
    5451#define PRIO_PROCESS    0
     
    9895#define RLIMIT_SBSIZE   9               /* maximum size of all socket buffers */
    9996#define RLIMIT_VMEM     10              /* virtual process size (inclusive of mmap) */
     97#define RLIMIT_AS       RLIMIT_VMEM     /* standard name for RLIMIT_VMEM */
    10098
    10199#define RLIM_NLIMITS    11              /* number of resource limits */
    102100
    103101#define RLIM_INFINITY   ((rlim_t)(((u_quad_t)1 << 63) - 1))
     102/* XXX Missing: RLIM_SAVED_MAX, RLIM_SAVED_CUR */
    104103
    105104
     
    124123#endif
    125124
    126 struct orlimit {
    127         int32_t rlim_cur;               /* current (soft) limit */
    128         int32_t rlim_max;               /* maximum value for rlim_cur */
    129 };
     125#ifndef _RLIM_T_DECLARED
     126typedef __rlim_t        rlim_t;
     127#define _RLIM_T_DECLARED
     128#endif
    130129
    131130struct rlimit {
     
    134133};
    135134
    136 /* Load average structure. */
     135#if __BSD_VISIBLE
     136
     137struct orlimit {
     138        __int32_t       rlim_cur;       /* current (soft) limit */
     139        __int32_t       rlim_max;       /* maximum value for rlim_cur */
     140};
     141
    137142struct loadavg {
    138         fixpt_t ldavg[3];
    139         long    fscale;
     143        __fixpt_t       ldavg[3];
     144        long            fscale;
    140145};
    141146
     
    147152#define CPUSTATES       5
    148153
     154#endif  /* __BSD_VISIBLE */
     155
    149156#ifdef _KERNEL
    150157extern struct loadavg averunnable;
    151158extern long cp_time[CPUSTATES];
    152159
    153 int     dosetrlimit(struct thread *, u_int, struct rlimit *);
     160int     kern_setrlimit(struct thread *, u_int, struct rlimit *);
    154161
    155162#else
    156 #include <sys/cdefs.h>
    157163
    158164__BEGIN_DECLS
     165/* XXX 2nd arg to [gs]etpriority() should be an id_t */
    159166int     getpriority(int, /*int*/ id_t);         /* bird: SuS uses id_t */
    160167int     getrlimit(int, struct rlimit *);
Note: See TracChangeset for help on using the changeset viewer.