Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I obtain a list of UNIX system calls?

Where are some lists of system calls on UNIX?

This wasn't my original question, but thanks anyway :)

like image 786
Oleg Razgulyaev Avatar asked Apr 20 '10 04:04

Oleg Razgulyaev


People also ask

How many system calls are there in Unix?

Types of System calls. Here are the five types of System Calls in OS: Process Control. File Management.

Where is system call table in Linux?

Solved using the following approach: The system call table is located in arch/x86/syscalls/syscall_32. tbl for the x86 architecture.

How many Linux system calls are there?

There are 116 system calls; documentation for these can be found in the man pages. A system call is a request by a running task to the kernel to provide some sort of service on its behalf.


3 Answers

Read The Fine Manual. For system calls, start with

man 2 intro

That's how I got started in UNIX. We didn't have no fancy internet back then ...

like image 133
Duncan Avatar answered Oct 22 '22 03:10

Duncan


For the official, authoritative IEEE Std. 1003.1 / Single UNIX Specification (UNIX 2004) manpages, see:

  • Single UNIX Specification (Open Group Base Specification Issue 6) / IEEE Std. 1003.1 ("POSIX")

A full list of functions (system interfaces) may be found under "System Interfaces" or at the link. I would also like to use this as an opportunity to plug my Development / Coding Search custom search engine, which includes and is heavily biased towards the Single UNIX Specification / IEEE Std. 1003.1. For example, a standard search for fopen, close, unix, etc. have promotions taken out to ensure that results from the authoritative documentation are at the very top. Adding "man" in front of a query heavily weights the result in favor of the IEEE Std. 1003.1 man page as in man find, man free, man inttypes.h, etc., although most queries should favor IEEE Std. 1003.1 even without adding "man" (if it isn't, type bad query and tell me).

like image 25
Michael Aaron Safyan Avatar answered Oct 22 '22 01:10

Michael Aaron Safyan


man 2 syscalls

Aside from that, you can look in /usr/include/sys/syscall.h (which on my system merely #includes /usr/include/bits/syscall.h). That's generated at libc build time from kernel syscall list.

You can also grep the Linux kernel source for SYSCALL_DEFINE. (I'm not a BSD expert, but I think the equivalent in FreeBSD is SYSCALL_MODULE)

like image 8
Ken Bloom Avatar answered Oct 22 '22 02:10

Ken Bloom