/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2014 Garrrett D'Amore <garrett@damore.org>
*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#ifndef _SYS_RESOURCE_H
#define _SYS_RESOURCE_H
#include <sys/feature_tests.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Process priority specifications
*/
#define PRIO_PROCESS 0
/*
* Resource limits
*/
#if defined(_LP64)
typedef unsigned long rlim_t;
#else /* _LP64 */
/*
* The definitions of the following types and constants differ between the
* regular and large file compilation environments.
*/
#if _FILE_OFFSET_BITS == 32
typedef unsigned long rlim_t;
#else /* _FILE_OFFSET_BITS == 32 */
#endif /* _FILE_OFFSET_BITS == 32 */
#endif /* _LP64 */
#if defined(_SYSCALL32)
/* Kernel's view of user ILP32 rlimits */
struct rlimit32 {
};
#endif /* _SYSCALL32 */
struct rlimit {
};
/* transitional large file interface versions */
#ifdef _LARGEFILE64_SOURCE
struct rlimit64 {
};
#endif
/*
* Although the saved rlimits were initially introduced by the large file API,
* they are now available for all resource limits on the 64-bit kernel and for
* cpu time and file size limits on the 32-bit kernel.
*/
#if defined(_LP64)
#else /* _LP64 */
#endif /* _LP64 */
struct rusage {
};
#if defined(_SYSCALL32)
struct rusage32 {
};
#endif /* _SYSCALL32 */
#ifdef _KERNEL
struct proc;
#else
#define RUSAGE_SELF 0
/*
* large file compilation environment setup
*/
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#endif
#endif /* !_LP64 && _FILE_OFFSET_BITS == 64 */
#if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
/*
* In the LP64 compilation environment, map large file interfaces
* back to native versions where possible.
*/
#ifdef __PRAGMA_REDEFINE_EXTNAME
#else
#endif
#endif /* _LP64 && _LARGEFILE64_SOURCE */
/* transitional large file interfaces */
!defined(__PRAGMA_REDEFINE_EXTNAME))
extern int setrlimit64(int, const struct rlimit64 *);
extern int getrlimit64(int, struct rlimit64 *);
#endif /* _LARGEFILE64_SOURCE... */
extern int getpriority(int, id_t);
extern int setpriority(int, id_t, int);
#endif /* _KERNEL */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_RESOURCE_H */