hjl / source-git / glibc

Forked from source-git/glibc 3 years ago
Clone

Blame resource/sys/vlimit.h

Packit 6c4009
/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
#ifndef _SYS_VLIMIT_H
Packit 6c4009
#define _SYS_VLIMIT_H	1
Packit 6c4009
Packit 6c4009
#include <features.h>
Packit 6c4009
Packit 6c4009
__BEGIN_DECLS
Packit 6c4009
Packit 6c4009
/* This interface is obsolete, and is superseded by <sys/resource.h>.  */
Packit 6c4009
Packit 6c4009
/* Kinds of resource limit.  */
Packit 6c4009
enum __vlimit_resource
Packit 6c4009
{
Packit 6c4009
  /* Setting this non-zero makes it impossible to raise limits.
Packit 6c4009
     Only the super-use can set it to zero.
Packit 6c4009
Packit 6c4009
     This is not implemented in recent versions of BSD, nor by
Packit 6c4009
     the GNU C library.  */
Packit 6c4009
  LIM_NORAISE,
Packit 6c4009
Packit 6c4009
  /* CPU time available for each process (seconds).  */
Packit 6c4009
  LIM_CPU,
Packit 6c4009
Packit 6c4009
  /* Largest file which can be created (bytes).  */
Packit 6c4009
  LIM_FSIZE,
Packit 6c4009
Packit 6c4009
  /* Maximum size of the data segment (bytes).  */
Packit 6c4009
  LIM_DATA,
Packit 6c4009
Packit 6c4009
  /* Maximum size of the stack segment (bytes).  */
Packit 6c4009
  LIM_STACK,
Packit 6c4009
Packit 6c4009
  /* Largest core file that will be created (bytes).  */
Packit 6c4009
  LIM_CORE,
Packit 6c4009
Packit 6c4009
  /* Resident set size (bytes).  */
Packit 6c4009
  LIM_MAXRSS
Packit 6c4009
};
Packit 6c4009
Packit 6c4009
/* This means no limit.  */
Packit 6c4009
#define INFINITY 0x7fffffff
Packit 6c4009
Packit 6c4009
Packit 6c4009
/* Set the soft limit for RESOURCE to be VALUE.
Packit 6c4009
   Returns 0 for success, -1 for failure.  */
Packit 6c4009
extern int vlimit (enum __vlimit_resource __resource, int __value) __THROW;
Packit 6c4009
Packit 6c4009
Packit 6c4009
__END_DECLS
Packit 6c4009
Packit 6c4009
#endif /* sys/vlimit.h  */