OSDN Git Service

util/coroutine: Cleanup start_switch_fiber_ for TSAN.
authorRobert Foley <robert.foley@linaro.org>
Wed, 1 Jul 2020 13:56:16 +0000 (14:56 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Sat, 11 Jul 2020 14:52:59 +0000 (15:52 +0100)
commit995f5c3c323a4703716c58fae78bee6276d49bef
tree2292dcd94fa91a835a77ac7a096f3beb257480d6
parentb418d2656112174ce27117ae4f75594b6a8abc5f
util/coroutine: Cleanup start_switch_fiber_ for TSAN.

This is a cleanup patch to follow-up the patch which introduced TSAN.
This patch makes separate start_switch_fiber_ functions for TSAN and ASAN.

This does two things:
1. Unrelated ASAN and TSAN code is separate and each function only
   has arguments that are actually needed.
2. The co->tsan_caller_fiber and co->tsan_co_fiber fields are only
   access from within #ifdef CONFIG_TSAN.

Signed-off-by: Robert Foley <robert.foley@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200626170001.27017-1-robert.foley@linaro.org>
Message-Id: <20200701135652.1366-5-alex.bennee@linaro.org>
util/coroutine-ucontext.c