diff options
author | Ben Pfaff <blp@nicira.com> | 2010-01-06 14:26:48 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-01-06 14:26:48 -0800 |
commit | 539e96f62300e4afab00e5906a28e3b89301d62e (patch) | |
tree | d91d559866c7a32d48613d2cae3a8b52c56bdb36 /lib/stream-provider.h | |
parent | e0668bd1d448d6f17c20b9c7ba91344180809061 (diff) | |
download | openvswitch-539e96f62300e4afab00e5906a28e3b89301d62e.tar.gz |
stream: Add stream_run(), stream_run_wait() functions.
SSL, which will be added in an upcoming commit, requires some background
processing, which is best done in a "run" function in our architecture.
This commit adds stream_run() and stream_run_wait() and calls to them from
the places where they will be required.
Diffstat (limited to 'lib/stream-provider.h')
-rw-r--r-- | lib/stream-provider.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stream-provider.h b/lib/stream-provider.h index 6beaab75e..872da3c7d 100644 --- a/lib/stream-provider.h +++ b/lib/stream-provider.h @@ -109,6 +109,18 @@ struct stream_class { * accepted for transmission, it should return -EAGAIN immediately. */ ssize_t (*send)(struct stream *stream, const void *buffer, size_t n); + /* Allows 'stream' to perform maintenance activities, such as flushing + * output buffers. + * + * May be null if 'stream' doesn't have anything to do here. */ + void (*run)(struct stream *stream); + + /* Arranges for the poll loop to wake up when 'stream' needs to perform + * maintenance activities. + * + * May be null if 'stream' doesn't have anything to do here. */ + void (*run_wait)(struct stream *stream); + /* Arranges for the poll loop to wake up when 'stream' is ready to take an * action of the given 'type'. */ void (*wait)(struct stream *stream, enum stream_wait_type type); |