maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #06619
Re: [Commits] Rev 3916: MDEV-5403 - Reduce usage of LOCK_open: tc_count
Hi, Sergey!
Not a review, only a comment on TDC_atomic part:
1. This is perfectly generally useful, not TDC specific at all.
I'd consider moving it to my_atomic.h under #ifdef __cplusplus
2. These are supposed to be trivial inlined functions. I don't think you
should use inheritance and virtual methods here. Everything should be
in the template.
I understand that function names (add64/add32/etc) are a bit tricky.
Two approaches: pass them as template parameters (like in
template <typename T, ADD, CAS, ...>) or - perhaps, if you put this into
my_atomic.h you'll be able to generate the necessary code without using
my_atomic_add32/etc ?
Regards,
Sergei
Follow ups