Main Page | Alphabetical List | Class List | File List | Class Members | File Members

unistd.h File Reference

#include <nlibc.h>
#include <errno.h>
#include <stddef.h>

Include dependency graph for unistd.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Enumerations

enum  { _SC_CLK_TCK = 2 }

Functions

void * w_sbrk (ptrdiff_t words)
void * sbrk (ptrdiff_t inc_bytes)
long sysconf (int name)


Enumeration Type Documentation

anonymous enum
 

NAME
sysconf - get configuration information at runtime
SYNOPSIS
#include <unistd.h>

long sysconf(int name);
DESCRIPTION
POSIX allows an application to test at compile- or run-time whether certain options are supported, or what the value is of certain configurable constants or limits.
RETURN VALUE
If name is invalid, -1 is returned, and errno is set to EINVAL. Otherwise, the value returned is the value of the system resource and errno is not changed. In the case of options, a positive value is returned if a queried option is available, and -1 if it is not. In the case of limits, -1 means that there is no definite limit.
apeNEXT IMPLEMENTATION
Only a small set of the POSIX.1/POSIX.2 variables is supported.
Enumeration values:
_SC_CLK_TCK  The number of clock ticks per second.

Definition at line 115 of file unistd.h.


Function Documentation

void* sbrk ptrdiff_t  inc_bytes  ) 
 

long sysconf int  name  ) 
 

void* w_sbrk ptrdiff_t  words  ) 
 

NAME
brk, sbrk - change data segment size
SYNOPSIS
#include <unistd.h>

int brk(void *end_data_segment);

void *sbrk(ptrdiff_t increment_bytes);
void *w_sbrk(ptrdiff_t increment_word);
DESCRIPTION
brk sets the end of the data segment to the value specified by end_data_segment, when that value is reasonable, the system does have enough memory and the process does not exceed its max data size (see setrlimit(2)).
sbrk increments the program's data space by increment bytes. sbrk isn't a system call, it is just a C library wrapper. Calling sbrk with an increment of 0 can be used to find the current location of the program break. w_sbrk is a variant of sbrk that accepts the increment in words.
RETURN VALUE
On success, brk returns zero, and sbrk returns a pointer to the start of the new area. On error, -1 is returned, and errno is set to ENOMEM.
apeNEXT IMPLEMENTATION
  • Memory is allocated in units of words.
  • On error an exception is thrown.


Generated on Mon Feb 20 15:54:56 2006 for nlibc by doxygen 1.3.5