Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

290
Visualizações
Posix Semaphores source code location in linux

I have started learning semaphores concept in Operating System. I am using POSIX semaphores in linux. I have used sem_init(), sem_wait() and sem_post() for initializing, decrementing and incrementing semaphore variables.

I have seen Function declarations given in semaphore.h file.

But I couldn't find source code of these above functions. I have gone through some kernel source files but I couldn't find them. From where can I get these source code files?

I am using linux 3.6.11-4 kernel.

Thanks.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Unlike the older "SysV IPC" semaphores (semctl, semop, etc), the POSIX semaphore API is not implemented directly by the kernel. Instead, the C library implements it on top of the futex generic synchronization primitive.

The code you are looking for is in the nptl subdirectory of the GNU libc source tree. You may also have to go digging around in sysdeps to find all of it.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda