Systémové knihovny a APIs

Programovací rozhraní

Programovací jazyk C

The language of operating systems

Systémové knihovny

Declaration: what but not how

int sum( int a, int b );

Definition: how is the operation done?

int sum( int a, int b )
{
	return a + b;
}

Library Files

Statické knihovny

Shared (dynamic) libraries

Header files

The POSIX C library

System calls

Numbers

syscall funkce

Wrappers

Portability

NeXTSTEP and Objective-C

Systemové knihovny: UNIX

Systémové knihovny: Windows

Documentation

Compiler & Linker

C compiler

Object file

Formáty

Archives

Linker

Symbols vs Addresses

Resolving symbols

Executable

Shared libraries

Addresses revisited

Compiler, Linker, …

File-Based APIs

Everything is a File

Co je to Filesystem

File paths

The file hierarchy

The role of files and filesystems

The filesystem API

File descriptors

Regular files

Directories

Mounts

Pipes

Devices

Sockets

Socket Types