diff options
author | trz <trz> | 2005-06-22 18:57:39 +0000 |
---|---|---|
committer | trz <trz> | 2005-06-22 18:57:39 +0000 |
commit | c32a1f6186a9fa45d2aa45241be04428a006db11 (patch) | |
tree | 68388ad0461292dcde56b0ce033a256bf3bf4e3b | |
parent | 44705a5756d7b47c02566e0fbc2df3ed106d9aee (diff) | |
download | systemtap-steved-c32a1f6186a9fa45d2aa45241be04428a006db11.tar.gz systemtap-steved-c32a1f6186a9fa45d2aa45241be04428a006db11.tar.xz systemtap-steved-c32a1f6186a9fa45d2aa45241be04428a006db11.zip |
updated relayfs with latest patches
-rw-r--r-- | runtime/relayfs/linux/relayfs_fs.h | 4 | ||||
-rw-r--r-- | runtime/relayfs/relay.c | 8 | ||||
-rw-r--r-- | runtime/relayfs/relayfs.txt | 8 |
3 files changed, 18 insertions, 2 deletions
diff --git a/runtime/relayfs/linux/relayfs_fs.h b/runtime/relayfs/linux/relayfs_fs.h index 1f697c3b..2d270a3f 100644 --- a/runtime/relayfs/linux/relayfs_fs.h +++ b/runtime/relayfs/linux/relayfs_fs.h @@ -59,6 +59,7 @@ struct rchan int overwrite; /* overwrite buffer when full? */ struct rchan_callbacks *cb; /* client callbacks */ struct kref kref; /* channel refcount */ + void *private_data; /* for user-defined data */ struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ }; @@ -88,6 +89,9 @@ struct rchan_callbacks * @prev_subbuf_idx: the previous sub-buffer's index * @prev_subbuf: the start of the previous sub-buffer * + * The client should return the number of bytes it reserves at + * the beginning of the sub-buffer, 0 if none. + * * NOTE: subbuf_start will also be invoked when the buffer is * created, so that the first sub-buffer can be initialized * if necessary. In this case, prev_subbuf will be NULL. diff --git a/runtime/relayfs/relay.c b/runtime/relayfs/relay.c index 5998db80..e35429ff 100644 --- a/runtime/relayfs/relay.c +++ b/runtime/relayfs/relay.c @@ -155,6 +155,10 @@ static inline void __relay_reset(struct rchan_buf *buf, int init) if (init) { init_waitqueue_head(&buf->read_wait); kref_init(&buf->kref); + INIT_WORK(&buf->wake_readers, NULL, NULL); + } else { + cancel_delayed_work(&buf->wake_readers); + flush_scheduled_work(); } atomic_set(&buf->subbufs_produced, 0); @@ -171,8 +175,6 @@ static inline void __relay_reset(struct rchan_buf *buf, int init) buf->offset = buf->chan->cb->subbuf_start(buf, buf->data, 0, NULL); buf->commit[0] = buf->offset; - - INIT_WORK(&buf->wake_readers, NULL, NULL); } /** @@ -238,6 +240,8 @@ static inline void relay_close_buf(struct rchan_buf *buf) { buf->finalized = 1; buf->chan->cb = &default_channel_callbacks; + cancel_delayed_work(&buf->wake_readers); + flush_scheduled_work(); kref_put(&buf->kref, relay_remove_buf); } diff --git a/runtime/relayfs/relayfs.txt b/runtime/relayfs/relayfs.txt index ada829bb..6d973063 100644 --- a/runtime/relayfs/relayfs.txt +++ b/runtime/relayfs/relayfs.txt @@ -190,6 +190,14 @@ within the kernel application, such as enabling/disabling logging to the channel. +Resources +========= + +For news, example code, mailing list, etc. see the relayfs homepage: + + http://relayfs.sourceforge.net + + Credits ======= |