X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=Documentation%2Ffilesystems%2Frelay.txt;h=7fbb6ffe576910695a5aecabd21c1c428497304f;hb=98b96173c777c67daaa7d163a35e591e1928a164;hp=d6788dae034948ce35eab71bfa80e013217864ac;hpb=1b8b22f44bc68b066c571ca2b5ab4fda123c15bd;p=powerpc.git diff --git a/Documentation/filesystems/relay.txt b/Documentation/filesystems/relay.txt index d6788dae03..7fbb6ffe57 100644 --- a/Documentation/filesystems/relay.txt +++ b/Documentation/filesystems/relay.txt @@ -157,7 +157,7 @@ TBD(curr. line MT:/API/) channel management functions: relay_open(base_filename, parent, subbuf_size, n_subbufs, - callbacks) + callbacks, private_data) relay_close(chan) relay_flush(chan) relay_reset(chan) @@ -251,7 +251,7 @@ static struct rchan_callbacks relay_callbacks = And an example relay_open() invocation using them: - chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks); + chan = relay_open("cpu", NULL, SUBBUF_SIZE, N_SUBBUFS, &relay_callbacks, NULL); If the create_buf_file() callback fails, or isn't defined, channel creation and thus relay_open() will fail. @@ -289,6 +289,11 @@ they use the proper locking for such a buffer, either by wrapping writes in a spinlock, or by copying a write function from relay.h and creating a local version that internally does the proper locking. +The private_data passed into relay_open() allows clients to associate +user-defined data with a channel, and is immediately available +(including in create_buf_file()) via chan->private_data or +buf->chan->private_data. + Channel 'modes' ---------------