Locking of global variables
Frank Ch. Eigler
fche@redhat.com
Sat Aug 11 14:27:00 GMT 2007
mmlnx wrote:
> If I access (read or write) a global variable in a probe handler,
> how long is it locked? From looking at the generated code, I think
> it's locked until the handler returns. Does this mean we should
> avoid the use of globals whenever possible?
Yes.
> I'm asking because I'm considering doing something like the
> following to minimize code duplication in a set of probes handlers.
> [...]
A better way would be to use (wait for) the preprocessor macros.
- FChE
More information about the Systemtap
mailing list