Static functions - independence in threads



Given a parallelized loop (for example, via OpenMP's "parallel for"
utility) which calls a static function, does each unit of execution
(thread) traverse an independent version of the static function, or do
they all traverse the same shared code? In other words, do the
threads have to take turns accessing that static function, or do they
each get their own copy which they can call independently? Clearly
this would affect the efficiency of the threading. I've searched for
this answer at multiple books/sites/groups, and at best I get
allusions which hint at the notion that each thread gets its own
independent copy of the static functions... but I'd really like to
know with confidence.

.



Relevant Pages

  • Re: Static functions - independence in threads
    ... utility) which calls a static function, does each unit of execution ... traverse an independent version of the static function, ... allusions which hint at the notion that each thread gets its own ...
    (comp.programming.threads)
  • Re: Static functions - independence in threads
    ... utility) which calls a static function, does each unit of execution ... traverse an independent version of the static function, ... they all traverse the same shared code? ...
    (comp.programming.threads)