cnewdsm(varname,thisclass,thismode=NULL,val)
newdsm(varname,thisclass,thismode=NULL,val=NULL,size=NULL)
newbm(varname,thismode,nr,nc,val=NULL)
cnewdsm()
and newdsm()
create new
newbm()
creates new For cnewdsm()
, resorting
to newdsm()
only if finer control is needed.
In the case of cnewdsm()
, all clients execute the same call. But
if the initial value of the variable is to be that of a non-shared
variable in some thread, then that thread calls the function
newdsm()
with a non-NULL val
but a NULL size
, while
the other clients specify NULL for val
but a non-NULL for
size
.
For val
is not very useful; it's
easier to leave it at NULL and then set the variable after the call.