• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Lehrstuhl für Informatik 4 & 16
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
  • English
  • Campo
  • UnivIS
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik

Lehrstuhl für Informatik 4 & 16

Menu Menu schließen
  • Lehrstuhl
    • Leitbild
    • Team
    • Kontakt und Anfahrt
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Echtzeitsysteme
      • Energiebewusste Systeme
      • Verteilte Systeme
    • Projekte
      • BFT2Chain
      • e.LARN
      • NEON
      • PAVE
      • PRIMaTE
      • REFIT
      • ResPECT
      • SURESOFT
      • TRR 89 C1: iRTSS
      • TRR 89 C5
      • Watwa
    • Projektkampagnen
      • DOSS
      • maRE
    • Forschungsgruppen
      • ergoo
    Portal Forschung
  • Publikationen
  • Lehre
    • Wintersemester 2022/23
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Systemnahe Programmierung in C (für Wiederholer)
      • Systemprogrammierung 1 (für Wiederholer)
      • Systemprogrammierung 2
      • Verlässliche Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
    • Sommersemester 2023
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Lehre
  3. Wintersemester 2022/23
  4. Systemnahe Programmierung in C (für Wiederholer)
  5. Übung
  6. Linux libc-Doku

Linux libc-Doku

Bereichsnavigation: Lehre
  • Systemnahe Programmierung in C (für Wiederholer)
    • Vorlesung
      • Übung
        • Folien
        • Aufgaben
        • SPiCboard
          • Bauanleitung
            • Programmieren im CIP
              • Programmieren von zu Hause
                • libspicboard-Doku
                  • SPiC-IDE
                    • SPiCsim
                      • FAQ
                        • Projekte
                        • Linux libc-Doku
                        • Prüfung
                          • Klausurergebnisse
                          • Evaluation
                            • Intern

                            Linux libc-Doku

                            C Standard Library Overview for Linux

                            Introduction

                            This collection provides a number of examples and cheatsheets for commonly used libc functions and system calls for the Linux operating system. It gives a short description of each function and provides examples for their usage.

                            Functions are grouped in several categories, which cover specific use cases, respectively. For each category an overview of the involved functions and files is given followed by an example for the typical usage of these functions. After the usage example, a more detailed description of each function is given.

                            However, cheatsheets can not replace the thorough study of the corresponding manpages for more detailed information. Manpages can be retrieved using the following command:

                            man [<section>] <function>

                            Please use the following compiler flags for your exercises. These are the flags used to compile your Linux submissions.

                            CFLAGS = -std=c11 -pedantic -D_XOPEN_SOURCE=700 -Wall -Werror -O3

                            Cheatsheets (aka SPiC-Zettel)

                            • Errno Variable
                              Explanation of the errno variable.
                            • Memory
                              List of functions: malloc(), free()

                              Functions to (de-)allocate memory.

                            • Strings
                              List of functions: strlen(), strcpy(), strcat()

                              Functions to analyze and manipulate C strings.

                            • File System
                              List of functions:

                              • directory handling: opendir(), closedir(), readdir()
                              • file handling: fopen(), fclose(), stat(), lstat()

                              Functions for file and directory handling (i.e., opening/closing files and retrieving metadata).

                            • Input/Output
                              List of functions: printf(), fprintf(), fgetc(), fgets(), fputc(), fputs(), perror(), feof(), ferror()

                              Functions for (formatted) input and output.

                            • Processes
                              List of functions: exit(), wait(), waitpid(), fork(), execl(), execv(), execlp(), execvp(), strtok()

                              Functions to create new processes and wait for the termination of processes. Furthermore, functions to execute a new program in a process.

                            • Signals
                              List of functions: kill(), sigemptyset(), sigfillset(), sigaddset(), sigdelset(), sigismember(), sigprocmask(), sigaction(), sigsuspend()

                              Functions to deliver, synchronize, and wait for POSIX signals in Linux.

                            • Threads
                              List of functions: pthread_create(), pthread_exit(), pthread_join(), pthread_mutex_init(), pthread_mutex_lock(), pthread_mutex_unlock(), pthread_mutex_destroy()

                              Functions to create, synchronize, and wait for POSIX threads (pthreads).

                            PDF Version

                            Here you can find and download a PDF version (and a compact PDF version optimized for printing) of this documentation.

                            • PDF (full)
                            • PDF (compact)

                            Friedrich-Alexander-Universität
                            Erlangen-Nürnberg

                            Schlossplatz 4
                            91054 Erlangen
                            • Impressum
                            • Datenschutz
                            • Barrierefreiheit
                            Nach oben