


















it's somehow imperative for them to make direct system calls, therefore defeating attempts to form a cooperative commons that doesn't involve a CPU privilege transition. Why?libc does not provide a cooperative commons. From the beginning the C people have designed their interfaces to the system calls to deal with the shortcomings of C, in particular by introducing
errno.
But ok, you might still consider this a commons of a kind. But then the C people use macros liberally, in particular for implementing errno, thus only C programs can access these features without contortions. So no, the libc interface to the system calls is no cooperative commons. There is C, in a privileged position, the language that libc implementations are designed for, and for which compatibility is guaranteed. And there are the other languages, in a position that have to accomodate every whim of a libc maintainer if they choose to use libc.
In Linux system calls provide a cleaner, more stable, and, for other languages, easier to use interface, so why should anyone who implements a language other than C use the libc interface?
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。