diff options
Diffstat (limited to 'include/consumer.h')
-rw-r--r-- | include/consumer.h | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/include/consumer.h b/include/consumer.h index 4a456de512..d53d42a461 100644 --- a/include/consumer.h +++ b/include/consumer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015 The Chromium OS Authors. All rights reserved. +/* Copyright 2015 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * @@ -37,45 +37,11 @@ struct consumer_ops { struct consumer { /* - * A consumer references the producer at the other end of the queue. - * This allows the consumer to notify the producer when units are - * removed from the queue. - */ - struct producer const *producer; - - /* - * A consumer also references the queue that it is reading from. This - * and the producer reference above could be more flexibly replaced by - * a queue manager object that could handle multiple producer/consumers - * or alternate notification mechanisms. But that complexity is not - * yet warranted. + * A consumer references the queue that it is reading from. */ struct queue const *queue; struct consumer_ops const *ops; }; -/* - * Notify the consumer by calling its written method directly, as opposed to - * from a deferred callback or another task. - */ -void consumer_notify_directly(struct consumer const *consumer, size_t count); - -/* - * Read a single unit from the queue and notify the associated producer. - * Return the number of units read. - */ -size_t consumer_read_unit(struct consumer const *consumer, void *unit); - -/* - * Read multiple units from the queue, using the provided memcpy like routine - * and notify the producer. Return the number of units read. - */ -size_t consumer_read_memcpy(struct consumer const *consumer, - void *units, - size_t count, - void *(*memcpy)(void *dest, - void const *src, - size_t n)); - #endif /* INCLUDE_CONSUMER_H */ |