Back to index

glibc  2.9
Defines | Functions
hurdrlimit.c File Reference
#include <hurd.h>
#include <cthreads.h>
#include <hurd/resource.h>

Go to the source code of this file.

Defines

#define I(lim, val)   case RLIMIT_##lim: _hurd_rlimits[i].rlim_cur = (val); break

Functions

static void init_rlimit (void)
 text_set_element (_hurd_preinit_hook, init_rlimit)

Define Documentation

#define I (   lim,
  val 
)    case RLIMIT_##lim: _hurd_rlimits[i].rlim_cur = (val); break

Function Documentation

static void init_rlimit ( void  ) [static]

Definition at line 34 of file hurdrlimit.c.

{
  int i;

  __mutex_init (&_hurd_rlimit_lock);

  for (i = 0; i < RLIM_NLIMITS; ++i)
    {
      if (_hurd_rlimits[i].rlim_max == 0)
       _hurd_rlimits[i].rlim_max = RLIM_INFINITY;
      if (_hurd_rlimits[i].rlim_cur == 0)
#define I(lim, val) case RLIMIT_##lim: _hurd_rlimits[i].rlim_cur = (val); break
       switch (i)
         {
           I (NOFILE, 1024);       /* Linux 2.2.12 uses this initial value.  */

         default:
           _hurd_rlimits[i].rlim_cur = _hurd_rlimits[i].rlim_max;
           break;
         }
#undef I
    }

  (void) &init_rlimit;
}

Here is the call graph for this function:

text_set_element ( _hurd_preinit_hook  ,
init_rlimit   
)