Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

284
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!