K 10 svn:author V 8 hselasky K 8 svn:date V 27 2016-07-13T12:26:36.173337Z K 7 svn:log V 802 Implement new callout_init_lock_function() callout API function to support locking constructions. The purpose of this function is to allow a function callback to do locking before the callback is called, in order to solve race conditions. The function callback, callout_lock_func_t, is passed two arguments. The first is the callout's callback argument, and the second is an integer, if set, indicates a lock operation, and if cleared, indicates an unlock operation. Some clients of the callout API like the TCP stack use locking constructions, that means one more more locks locked in series. By using callout_init_lock_function() these clients can lock all the locks required in order to atomically to complete their operations, instead of using lock-unlock-lock sequences which open up for races. END