IPC - semphores and static functions
In the book "Beginning Linux Programming [Wrox Press]" there's an example about IPC semaphores. It implements the simplest form of a semaphore (a binary semaphore) by a set of 4 functions. Alle of these functions are "static". Anybody knows why they are static functions? Do they need to be static? Why (not)?
Code:
/* Taken from the book "Beginning Linux Programming" by Wrox Press |
static functions are not exported, i always declare functions static unless i want them to be called from an external object file, the author most likely decided that it would be unwise for other object files to be able to call thses functions hence he made them static. i dont think its necessary though.
|
All times are GMT -5. The time now is 06:36 PM. |