Nios® II Software Developer Handbook

ID 683525
Date 8/28/2023
Public
Document Table of Contents

7.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.