Description
Fetch-and-add function.Arguments
fav
Fetch-and-add variable (Rdsm integer vector of
length 1), name quoted. Details
When a client calls fa()
on fav
, the quantity
inc
(which could be negative) will be added to fav
,
atomically, i.e. without interference by another thread. The actual
addition will be performed at the server, thus reducing communications
costs.