]> granicus.if.org Git - strace/commit
Refactor maybe_switch_tcbs
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Jul 2019 16:12:44 +0000 (16:12 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 10 Jul 2019 16:12:44 +0000 (16:12 +0000)
commitd342f4753a1bba4593b00b8857df290a20e404bf
tree6aedd1159937aa04ff53ac49bc97fdef0cdd6eda
parente9ff1e84081f89f24e27edc9dcfad12c43e51ec3
Refactor maybe_switch_tcbs

Change maybe_switch_tcbs to return NULL when no switching is necessary.
Introduce maybe_switch_current_tcp as a thing wrapper around
maybe_switch_tcbs.

* strace.c (maybe_switch_current_tcp): New function.
(dispatch_event): Use it instead of maybe_switch_tcbs, move comments
and the os_release check before maybe_switch_tcbs invocation ...
(maybe_switch_tcbs): ... here.  Change return value to NULL
if no switching was performed.
strace.c