Back to index

glibc  2.9
Functions
sbrk.c File Reference
#include <errno.h>
#include <hurd.h>
#include <unistd.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * __sbrk (intptr_t increment)

Function Documentation

void* __sbrk ( intptr_t  increment)

Definition at line 27 of file sbrk.c.

{
  void *result;

  HURD_CRITICAL_BEGIN;
  __mutex_lock (&_hurd_brk_lock);
  result = (void *) _hurd_brk;
  if (increment != 0 && _hurd_set_brk (_hurd_brk + increment) < 0)
    result = (void *) -1;
  __mutex_unlock (&_hurd_brk_lock);
  HURD_CRITICAL_END;

  return result;
}

Here is the call graph for this function: