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

2016-08-20 Thread Zev Weiss
On Sun, Aug 21, 2016 at 08:40:59AM +0900, Norihiro Tanaka wrote: On Fri, 19 Aug 2016 18:03:19 -0500 Zev Weiss wrote: Okay -- so your question is about the necessity of making operations other than dfaexec() thread-safe? That's reasonable, though (obviously) I went ahead made the other oper

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

2016-08-20 Thread Norihiro Tanaka
On Fri, 19 Aug 2016 18:03:19 -0500 Zev Weiss wrote: > Okay -- so your question is about the necessity of making operations other > than dfaexec() thread-safe? That's reasonable, though (obviously) I went > ahead made the other operations thread-safe anyway. > > 1) It was, in some ways, simpl

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

2016-08-19 Thread Zev Weiss
On Sat, Aug 20, 2016 at 07:34:20AM +0900, Norihiro Tanaka wrote: On Sat, 20 Aug 2016 07:25:06 +0900 Norihiro Tanaka wrote: Hi Zev, Thanks for replying. I say a reverse thing. I believe that there is no problem if only dfaexec() is thread safe. In other words, I think that variables that we

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

2016-08-19 Thread Jim Meyering
On Fri, Aug 19, 2016 at 2:54 PM, Zev Weiss wrote: ... > The amended version of the patch looks fine to me, thanks for checking. Pushed.

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

2016-08-19 Thread Norihiro Tanaka
On Sat, 20 Aug 2016 07:25:06 +0900 Norihiro Tanaka wrote: > Hi Zev, > > Thanks for replying. I say a reverse thing. > > I believe that there is no problem if only dfaexec() is thread safe. In > other words, I think that variables that we must really move to support > multipthread are eolbyte,

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

2016-08-19 Thread Norihiro Tanaka
On Fri, 19 Aug 2016 16:46:16 -0500 Zev Weiss wrote: > 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 > th

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

2016-08-19 Thread Zev Weiss
On Fri, Aug 19, 2016 at 09:37:54AM -0700, Jim Meyering wrote: On Thu, Aug 18, 2016 at 7:46 AM, Jim Meyering wrote: On Thu, Aug 18, 2016 at 3:50 AM, Zev Weiss 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

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

2016-08-19 Thread Zev Weiss
On Sat, Aug 20, 2016 at 01:09:20AM +0900, Norihiro Tanaka wrote: On Thu, 18 Aug 2016 05:50:14 -0500 Zev Weiss 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 var

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

2016-08-19 Thread Jim Meyering
On Thu, Aug 18, 2016 at 7:46 AM, Jim Meyering wrote: > On Thu, Aug 18, 2016 at 3:50 AM, Zev Weiss 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. > > Thank you. > At first glance, I

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

2016-08-19 Thread Norihiro Tanaka
On Thu, 18 Aug 2016 05:50:14 -0500 Zev Weiss 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() whic

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

2016-08-18 Thread Jim Meyering
On Thu, Aug 18, 2016 at 3:50 AM, Zev Weiss 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. Thank you. At first glance, I like it, but saw no "const" attribute on any added parameter dec

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

2016-08-18 Thread Zev Weiss
* 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. --- src/dfa.c | 207 +- 1 file changed, 98 insertions(+), 109 deletions(-) diff --git a/sr