I am talking about C/C++.
Is it possible to measure the time difference between
a thread trying to access the socket (which is shared by several threads)
when it successfully writes and exits from the socket write().
For ex. in java we have something like [ monitor-contended-enter, monitor-contended-entered, monitor-contended-exit.|http://blogs.sun.com/kamg/entry/built_in_dtrace_probes_in#Monitor_Probes]
Do we have something like that for shared/contended socket access.