diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-01-15 17:10:04 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-01-21 12:51:53 -0800 |
commit | eb19473f1a5dd412f945a4526cb7834113defa44 (patch) | |
tree | 51fb0e12584b7f56e3121b7a749997f59b715b4e /src/til_stream.c | |
parent | 68347e96bbac8c60b32895c5214487f58990fea3 (diff) |
til_stream: add a second void* to til_stream_pipe_t
It seems likely that pipe owners will need not only a way to
differentiate themselves via the owner pointer, but also
somewhere to register a pipe-specific reference.
There probably needs to be a result pointer added for storing the
owner_foo when the owner taps, so the owner can make use of it.
Diffstat (limited to 'src/til_stream.c')
-rw-r--r-- | src/til_stream.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/til_stream.c b/src/til_stream.c index a47f953..5f26c72 100644 --- a/src/til_stream.c +++ b/src/til_stream.c @@ -73,6 +73,7 @@ typedef struct til_stream_pipe_t til_stream_pipe_t; struct til_stream_pipe_t { til_stream_pipe_t *next; const void *owner; + const void *owner_foo; char *parent_path; const til_tap_t *driving_tap; uint32_t hash; @@ -127,7 +128,7 @@ til_stream_t * til_stream_free(til_stream_t *stream) * * If stream is NULL it's treated as if the key doesn't exist without a pipe creation. */ -int til_stream_tap(til_stream_t *stream, const void *owner, const char *parent_path, uint32_t parent_hash, const til_tap_t *tap) +int til_stream_tap(til_stream_t *stream, const void *owner, const void *owner_foo, const char *parent_path, uint32_t parent_hash, const til_tap_t *tap) { uint32_t hash, bucket; til_stream_pipe_t *pipe; @@ -173,6 +174,7 @@ int til_stream_tap(til_stream_t *stream, const void *owner, const char *parent_p } pipe->owner = owner; + pipe->owner_foo = owner_foo; pipe->driving_tap = tap; pipe->parent_path = strdup(parent_path); |