Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

6.5. UNIX-Style Interface

The HAL API provides a number of UNIX-style functions. The UNIX-style functions provide a familiar development environment for new Nios II programmers, and can ease the task of porting existing code to run in the HAL environment. The HAL uses these functions primarily to provide the system interface for the ANSI C standard library. For example, the functions perform device access required by the C library functions defined in stdio.h.

The following list contains all of the available UNIX-style functions:

  • _exit()
  • close()
  • fstat()
  • getpid()
  • gettimeofday()
  • ioctl()
  • isatty()
  • kill()
  • lseek()
  • open()
  • read()
  • sbrk()
  • settimeofday()
  • stat()
  • usleep()
  • wait()
  • write()

The most commonly used functions are those that relate to file I/O.

For more information, refer to the “File System” chapter.

For more information about the use of these functions, refer to the "HAL API Reference" chapter.