Vote count:
0
When I compile a program using the POSIX sem_init() function, I get a compilation warning (error because I normally use -Werror) that the function has been deprecated. A quick look at /usr/include/sys/semaphore.h shows that the function does indeed have a __deprecated tag after its declaration, as do sem_getvalue() and sem_destroy() .
Questions:
Given that there is no hint of deprecation in the POSIX specification, why are these three functions singled out as deprecated?
Given that they are deprecated, what is the replacement, and why is the replacement preferred?
(I did check Ask Different first; there are no questions tagged c and no questions that ask about deprecated system calls — only programs.)
asked 1 min ago
Why are sem_init(), sem_getvalue(), sem_destroy() deprecated on Mac OS X — and what replaces them?
Aucun commentaire:
Enregistrer un commentaire