From f034dbc3eb32fda727357834d3a03a42df12edef Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 19 Jan 2023 22:43:05 -0800 Subject: til_stream: add til_stream_pipe_set_driving_tap() --- src/til_stream.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/til_stream.c') diff --git a/src/til_stream.c b/src/til_stream.c index 4109d8f..e59cbc9 100644 --- a/src/til_stream.c +++ b/src/til_stream.c @@ -403,3 +403,15 @@ void til_stream_pipe_set_owner(til_stream_pipe_t *pipe, const void *owner, const pipe->owner = owner; pipe->owner_foo = owner_foo; } + + +/* NULLing out the driving_tap isn't supported, since the tap name is part of the pipe's identity, + * just set tap.inactive to indicate another tap should take over driving. + */ +void til_stream_pipe_set_driving_tap(til_stream_pipe_t *pipe, const til_tap_t *driving_tap) +{ + assert(pipe); + assert(driving_tap); + + pipe->driving_tap = driving_tap; +} -- cgit v1.2.1