No, not at all.
The callback function passes the address (or some other identifier) ββof the function to another function so that for some reason it can call back.
A classic example is the C qsort
standard library. You pass a pointer to an array (and its dimensions) along with a comparison function. The qsort
function then uses this comparison function (callback) to decide which of the two items in the list is greater so that it can arrange them.
IPC, on the other hand, is a means for processes to interact with each other, such as shared memory, pipes, semaphores, etc.
Some IPC mechanisms may use callbacks, but this is by no means necessary. For example, sockets do not use callbacks; they simply allow the user to call read
and write
.
Similarly with shared memory, you join the memory blocks and simply access them in the same way as the βnormalβ memory, just that the effects are felt in all processes connected to this memory.
One who uses callbacks is ONC RPC (or Sun RPC). It starts a server that waits for client calls over the network and passes them to a pre-configured client function. More information can be found here .
But even then I would not dare to call it a callback, since it is really configured at compile time. Correct callbacks are usually executed at run time.
source share