If I understand the docs correctly the only way to initialize self vars is 
automatic initialization: zero it is.

I feel it would be very nice if we could explicitly initialize vars before 
their use. To values not zero that is.  Currently I have a situation where the 
application uses just positive values. zero is a valid value here that 
therefore cannot be used to mean "uninitialized".
I now need another self-> var telling me if the actual variable is initialized. 
This flag is set always when that other var is set. And needs always be used in 
the predicates to tests if that var has meaningful information.
Using the value -1 only once would make the code more readable.

Is this auto init of thread local variables there to stay (design?) or could it 
be an enhancement for a future version of DTrace?


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to