In all books semaphore is listed under IPC mechanism? Why is it like that? Because what I know is that semaphore is used for synchronization.
I have read one similar question in this forum but, that didn't cleared the doubt.
man page for sem_overview tells (with description how to do it) :
POSIX semaphores allow processes and threads to synchronize their actions.
therefore semaphores can be used for interprocess communication.
I think the reason is because of named semaphores.
There are two types of semaphores, named and unnamed.
Usually named semaphores are used for processes synchronization, whereas unnamed semaphores are used for threads synchronization.
This Multithreaded Programming Guide says
Named semaphores are like process-shared semaphores, except that named semaphores are referenced with a pathname rather than a pshared value. Named semaphores are sharable by several processes.
*It is possible to share unnamed semaphores (with child processes for example) among process but it is not common.