Results 1 to 5 of 5

Thread: The GNU C Library Missing Sources

  1. #1
    Join Date
    Oct 2009
    Beans
    45

    The GNU C Library Missing Sources

    Hi,
    I'm trying to write a Semaphore implementation so I thought of looking at the current semaphore implementation from the GNU C Library.
    I couldn't find the source files, only the headers semaphore.h, semaphoreP.h, semaphore.h-data. A lot of these semaphore.h headers were repeated too. Strange.
    I think the reason there was no source file is because the semaphore itself is probably OS/kernel implemented.
    So my question stands. If Ubuntu is supposed to be "open", and the source, "readily available" how could I get my hands on the current source for the semaphore?
    Thanks,
    -Falven
    Last edited by falven; April 27th, 2014 at 07:18 PM.

  2. #2
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: The GNU C Library Missing Sources

    Sometimes looking at the header files can be more confusing than helpful.

    Here's an example of a program which uses semaphore.h
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

  3. #3
    Join Date
    Oct 2009
    Beans
    45

    Re: The GNU C Library Missing Sources

    lisati,
    Thanks for your reponse and help so far
    Unfortunately, however, this is not what I am looking for. I am actually attempting to write the semaphore itself. Not use it.
    -Falven

  4. #4
    Join Date
    Apr 2012
    Beans
    7,256

    Re: The GNU C Library Missing Sources

    The semaphore implementation is part of the kernel source - you'd need to download the kernel source tree (either using apt-get source or from the git repo)

    Code:
    $ find linux-3.2.0/ -name 'semaphore.c'
    linux-3.2.0/kernel/semaphore.c
    See https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

  5. #5
    Join Date
    Oct 2009
    Beans
    45

    Re: The GNU C Library Missing Sources

    Quote Originally Posted by steeldriver View Post
    The semaphore implementation is part of the kernel source - you'd need to download the kernel source tree (either using apt-get source or from the git repo)

    Code:
    $ find linux-3.2.0/ -name 'semaphore.c'
    linux-3.2.0/kernel/semaphore.c
    See https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
    Perfect!
    Thanks,
    -Falven

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •