What's the difference between “C system calls” and “C library routines”?

前端 未结 5 1048
误落风尘
误落风尘 2020-12-01 01:20

There are multiple sections in the manpages. Two of them are:

2     Unix and C system calls
3     C Library routines for C programs

For example there i

5条回答
  •  爱一瞬间的悲伤
    2020-12-01 01:26

    The calls described in section 2 of the manual are all relatively thin wrappers around actual calls to system services that trap to the kernel. The C standard library routines described in section 3 of the manual are client-side library functions that may or may not actually use system calls.

    This posting has a description of system calls and trapping to the kernel (in a slightly different context) and explains the underlying mechanism behind system calls with some references.

提交回复
热议问题