Szerző: Matthew Hall Dátum: Címzett: pcre-dev Tárgy: [pcre-dev] Using pcre_assign_jit_stack and pcre_extra* in multiple
threads
I have a question about the internal thread JIT stack accessed by using
pcre_assign_jit_stack(re_extra, NULL, NULL) .
In my program I have a linked list of pcre* and pcre_extra* entries which are
created at program start, then iterated over by multiple threads.
Each thread would call pcre_assign_jit_stack before matching using the pcre*
and pcre_extra* as arguments to pcre_exec.
However I'm unclear on one thing. If each thread calls pcre_assign_jit_stack
on the same pcre* at the same time, will any of the entries in the pcre_extra*
end up in an indeterminate state, because they're referencing the jit_stack,
or is it setup so that the jit_stack only references the pcre_extra and not
the other way around?
I wasn't 100% I coded it right given the various manual page warnings.