[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: |
Norihiro Tanaka |
Subject: |
bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c |
Date: |
Sat, 20 Aug 2016 07:25:06 +0900 |
On Fri, 19 Aug 2016 16:46:16 -0500
Zev Weiss <address@hidden> 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
> 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?
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, sbit and letters, newline only which depend
on eolbyte, and mbrtowc_cache[] and never_trail should be changed as the
value does not changed by other thread at running dfaexec() by marking
already set, and we can leave other static and global as syntax etc.
It will bring us to the saving of memory albeit only slightly.
Thanks,
Norihiro
- bug#24259: [PATCH 0/6] dfa: thread safety, Zev Weiss, 2016/08/18
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Zev Weiss, 2016/08/18
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Jim Meyering, 2016/08/18
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Norihiro Tanaka, 2016/08/19
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Zev Weiss, 2016/08/19
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c,
Norihiro Tanaka <=
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Norihiro Tanaka, 2016/08/19
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Zev Weiss, 2016/08/19
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Norihiro Tanaka, 2016/08/20
- bug#24260: [PATCH 1/6] dfa: thread-safety: remove 'dfa' global in dfa.c, Zev Weiss, 2016/08/20
- bug#24259: [PATCH 3/6] dfa: thread-safety: move parser state into struct dfa, Zev Weiss, 2016/08/18
- bug#24259: [PATCH 5/6] dfa: thread-safety: eliminate static local variables, Zev Weiss, 2016/08/18
- bug#24259: [PATCH 2/6] dfa: thread-safety: move lexer state into struct dfa, Zev Weiss, 2016/08/18
- bug#24259: [PATCH 4/6] dfa: thread-safety: move regex syntax configuration into struct dfa, Zev Weiss, 2016/08/18
- bug#24259: [PATCH 6/6] dfa: thread-safety: initialize mbrtowc_cache in dfa_init(), Zev Weiss, 2016/08/18
- bug#24259: [PATCH 0/6] dfa: thread safety, Jim Meyering, 2016/08/20