Dr Andrew Scott G7VAV

My photo
 
April 2024
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12


resource.h
001: /* Copyright (C) 1992,94,1996-2000,2002,2004 Free Software Foundation, Inc.
002:    This file is part of the GNU C Library.
003: 
004:    The GNU C Library is free software; you can redistribute it and/or
005:    modify it under the terms of the GNU Lesser General Public
006:    License as published by the Free Software Foundation; either
007:    version 2.1 of the License, or (at your option) any later version.
008: 
009:    The GNU C Library is distributed in the hope that it will be useful,
010:    but WITHOUT ANY WARRANTY; without even the implied warranty of
011:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
012:    Lesser General Public License for more details.
013: 
014:    You should have received a copy of the GNU Lesser General Public
015:    License along with the GNU C Library; if not, write to the Free
016:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
017:    02111-1307 USA.  */
018: 
019: #ifndef _SYS_RESOURCE_H
020: #define _SYS_RESOURCE_H 1
021: 
022: #include <features.h>
023: 
024: /* Get the system-dependent definitions of structures and bit values.  */
025: #include <bits/resource.h>
026: 
027: #ifndef __id_t_defined
028: typedef __id_t id_t;
029: # define __id_t_defined
030: #endif
031: 
032: __BEGIN_DECLS
033: 
034: /* The X/Open standard defines that all the functions below must use
035:    `int' as the type for the first argument.  When we are compiling with
036:    GNU extensions we change this slightly to provide better error
037:    checking.  */
038: #if defined __USE_GNU && !defined __cplusplus
039: typedef enum __rlimit_resource __rlimit_resource_t;
040: typedef enum __rusage_who __rusage_who_t;
041: typedef enum __priority_which __priority_which_t;
042: #else
043: typedef int __rlimit_resource_t;
044: typedef int __rusage_who_t;
045: typedef int __priority_which_t;
046: #endif
047: 
048: /* Put the soft and hard limits for RESOURCE in *RLIMITS.
049:    Returns 0 if successful, -1 if not (and sets errno).  */
050: #ifndef __USE_FILE_OFFSET64
051: extern int getrlimit (__rlimit_resource_t __resource,
052:                       struct rlimit *__rlimits) __THROW;
053: #else
054: # ifdef __REDIRECT_NTH
055: extern int __REDIRECT_NTH (getrlimit, (__rlimit_resource_t __resource,
056:                                        struct rlimit *__rlimits), getrlimit64);
057: # else
058: #  define getrlimit getrlimit64
059: # endif
060: #endif
061: #ifdef __USE_LARGEFILE64
062: extern int getrlimit64 (__rlimit_resource_t __resource,
063:                         struct rlimit64 *__rlimits) __THROW;
064: #endif
065: 
066: /* Set the soft and hard limits for RESOURCE to *RLIMITS.
067:    Only the super-user can increase hard limits.
068:    Return 0 if successful, -1 if not (and sets errno).  */
069: #ifndef __USE_FILE_OFFSET64
070: extern int setrlimit (__rlimit_resource_t __resource,
071:                       __const struct rlimit *__rlimits) __THROW;
072: #else
073: # ifdef __REDIRECT_NTH
074: extern int __REDIRECT_NTH (setrlimit, (__rlimit_resource_t __resource,
075:                                        __const struct rlimit *__rlimits),
076:                            setrlimit64);
077: # else
078: #  define setrlimit setrlimit64
079: # endif
080: #endif
081: #ifdef __USE_LARGEFILE64
082: extern int setrlimit64 (__rlimit_resource_t __resource,
083:                         __const struct rlimit64 *__rlimits) __THROW;
084: #endif
085: 
086: /* Return resource usage information on process indicated by WHO
087:    and put it in *USAGE.  Returns 0 for success, -1 for failure.  */
088: extern int getrusage (__rusage_who_t __who, struct rusage *__usage) __THROW;
089: 
090: /* Return the highest priority of any process specified by WHICH and WHO
091:    (see above); if WHO is zero, the current process, process group, or user
092:    (as specified by WHO) is used.  A lower priority number means higher
093:    priority.  Priorities range from PRIO_MIN to PRIO_MAX (above).  */
094: extern int getpriority (__priority_which_t __which, id_t __who) __THROW;
095: 
096: /* Set the priority of all processes specified by WHICH and WHO (see above)
097:    to PRIO.  Returns 0 on success, -1 on errors.  */
098: extern int setpriority (__priority_which_t __which, id_t __who, int __prio)
099:      __THROW;
100: 
101: __END_DECLS
102: 
103: #endif  /* sys/resource.h  */
104: 


for client 3.145.186.6
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/