resource.h (170174) | resource.h (174070) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)resource.h 8.4 (Berkeley) 1/9/95 | 1/*- 2 * Copyright (c) 1982, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)resource.h 8.4 (Berkeley) 1/9/95 |
30 * $FreeBSD: head/sys/sys/resource.h 170174 2007-06-01 01:12:45Z jeff $ | 30 * $FreeBSD: head/sys/sys/resource.h 174070 2007-11-29 06:34:30Z peter $ |
31 */ 32 33#ifndef _SYS_RESOURCE_H_ 34#define _SYS_RESOURCE_H_ 35 36#include <sys/cdefs.h> 37#include <sys/_timeval.h> 38#include <sys/_types.h> --- 110 unchanged lines hidden (view full) --- 149#define CP_IDLE 4 150#define CPUSTATES 5 151 152#endif /* __BSD_VISIBLE */ 153 154#ifdef _KERNEL 155 156extern struct loadavg averunnable; | 31 */ 32 33#ifndef _SYS_RESOURCE_H_ 34#define _SYS_RESOURCE_H_ 35 36#include <sys/cdefs.h> 37#include <sys/_timeval.h> 38#include <sys/_types.h> --- 110 unchanged lines hidden (view full) --- 149#define CP_IDLE 4 150#define CPUSTATES 5 151 152#endif /* __BSD_VISIBLE */ 153 154#ifdef _KERNEL 155 156extern struct loadavg averunnable; |
157extern long cp_time[CPUSTATES]; | 157void read_cpu_time(long *cp_time); /* Writes array of CPUSTATES */ |
158 159#else 160 161__BEGIN_DECLS 162/* XXX 2nd arg to [gs]etpriority() should be an id_t */ 163int getpriority(int, int); 164int getrlimit(int, struct rlimit *); 165int getrusage(int, struct rusage *); 166int setpriority(int, int, int); 167int setrlimit(int, const struct rlimit *); 168__END_DECLS 169 170#endif /* _KERNEL */ 171#endif /* !_SYS_RESOURCE_H_ */ | 158 159#else 160 161__BEGIN_DECLS 162/* XXX 2nd arg to [gs]etpriority() should be an id_t */ 163int getpriority(int, int); 164int getrlimit(int, struct rlimit *); 165int getrusage(int, struct rusage *); 166int setpriority(int, int, int); 167int setrlimit(int, const struct rlimit *); 168__END_DECLS 169 170#endif /* _KERNEL */ 171#endif /* !_SYS_RESOURCE_H_ */ |