Re: Linux API developer documentation

From: Edward Diener (eldiener_no_spam_here_at_earthlink.net)
Date: 04/09/05


Date: Sat, 09 Apr 2005 02:11:32 GMT

Peter T. Breuer wrote:
> Edward Diener <eldiener_no_spam_here@earthlink.net> wrote:
>> John Hasler wrote:
>>> Edward Diener writes:
>>>> Where does one normally find the documentation to the core
>>>> functions of the Linux API ?
>>>
>>> Libc. On Debian you would install libc6-dev, glibc-doc, and
>>> manpages-dev. 'info libc' will then tell you everything could could
>>> possibly want to know. There is also a man page for each function.
>>> The 'apropos' command will help you find it. I also suggest that
>>> you Google 'POSIX'.
>>
>> Thanks ! I am a C++ programmer so I will not have problems with
>> that. I am intirigued however by how other languages, such as Python
>> and Java access the Linux kernel.
>
> Java has its own API. In each native archtecture the java support has
> to supply the standard java interface to the programmer. It's likely
> written in C, so all it has to do is hook into libc.
>
> Python has its own API ...
>
> (I hope you get the idea).
>
>> Is there no shared library with exported functions under
>> Linux which can be accessed by other languages ?
>
> Sure - any one. All you need is that your language has a way of
> calling C library functions. C does. Fortran does. I even seem to
> recall that java does! (though I'm not going to look it up).
>
>> If there is, is there no
>> general documentation other than the libc documentation about the
>> kernel
>
> What "kernel functionality"? It's none of your business what the
> kernel is, or how it works! It doesn't even have to be a linux kernel.
> Libraries and applications will be built against libc. It's libc's
> (and maybe some few other libraries) job to interface with the
> kernel, and it provides the standard posix interface to applications.
>
>> functionality ? Sorry to be comparing the Linux core functionality to
>> Windows, which is what I have largely worked with, but in that OS
>> there is an API of base services which serves as the documentation
>> for Windows core
>
> You are confusing libraries and kernel.
>
>> functionality ( implemented in Windows shared libraries ). Does
>> Linux have
>
> Then talk about libraries, not "windows". Linux distributions
> generally also have a library that implements a winodws API.
>
>> such documentation or is it encompassed completely in the
>> documentation for libc. Maybe the POSIX documentation is the
>> equivalent to what I am thinking.
>
> If you are looking for the standard posix API, then yes, you would be
> looking for the posix documentation on the standard posix API. But
> what's wrong with the man pages? Posix is only a formalization and
> standardisation of the common unix practices and functions as
> developed over thirty plus years. They won't say anything different.
> You will always see in a man page something like:
>
>
> CONFORMING TO
> ... POSIX, ...
>
> You are free to implement or use any other API, however! Whatever you
> like. However, that would mean you having to maintain a library that
> interfaces with and tracks kernel syscalls, which is a big job. It's
> the thankless task done by libc.
>
> Choose an API. Then use it.

OK, I get the idea. Libc is it. Thanks !



Relevant Pages

  • Re: Would I be violating the GPL?
    ... > incorporate in any way any kernel headers or source code tagged GPL) do ... but Linux folks seem to be reasonable on this point. ... derived work of that specific implementation of the API, ... demonstrably derived from _documentation_, not from code. ...
    (Linux-Kernel)
  • Re: [PATCH] USB: mark USB drivers as being GPL only
    ... derivative of the API. ... However, in the case of the Linux Kernel, the code is ... written specifically for Linux is a derivative of the kernel. ... international copyright laws, specific countries do seem to have laws that ...
    (Linux-Kernel)
  • Re: Linux drivers management
    ... Linux source. ... If you split up drivers and the core kernel into two sepperate ... API change needs to be made. ...
    (Linux-Kernel)
  • Re: Is FREEDOS a real time OS?
    ... Every OS has an API. ... Or, if the API is a part of the kernel, is there a more ... basically the Linux Kernel API is all the kernel calls. ... to boot the new partition. ...
    (comp.sys.ibm.pc.hardware.misc)
  • Re: What is the counterpart of javaxmail api in linux?
    ... > javaxmail api from java on Windows to java on Linux. ...
    (comp.lang.java.developer)