bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c


From: Zev Weiss
Subject: bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c
Date: Fri, 19 Aug 2016 16:46:16 -0500
User-agent: Mutt/1.6.2-neo (2016-07-23)

On Sat, Aug 20, 2016 at 01:09:20AM +0900, Norihiro Tanaka wrote:

On Thu, 18 Aug 2016 05:50:14 -0500
Zev Weiss <address@hidden> wrote:

* src/dfa.c: remove global dfa struct.  A pointer to a struct dfa is
instead added as a parameter to the functions that had been using the
global.

Hi,

Why we move global variable DFA into struct dfa, Although only used in
dfacomp() which I seem that does not support multithread even after
applying your patches?  Variables for syntax (lexptr etc.), like.

Thanks,
Norihiro


I'm not sure I understand -- the first patch in my series just removes the global dfa variable and instead passes it as a parameter. This alone doesn't make the whole thing thread-safe, it's just a first step along the way. With the whole series applied though I believe everything should be thread-safe (for example, lexptr is moved into a sub-struct of struct dfa in the second patch in the series).

Is there some non-thread-safe code that would remain after applying all six patches in the series?


Thanks,
Zev






reply via email to

[Prev in Thread] Current Thread [Next in Thread]