source:
mainline/uspace/lib/c/include/adt/prodcons.h@
d7f7a4a
| Last change on this file since d7f7a4a was d7f7a4a, checked in by , 3 years ago | |
|---|---|
|
|
| File size: 502 bytes | |
| Rev | Line | |
|---|---|---|
| [09696b54] | 1 | /* |
| [d7f7a4a] | 2 | * SPDX-FileCopyrightText: 2011 Martin Decky |
| [09696b54] | 3 | * |
| [d7f7a4a] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
| [09696b54] | 5 | */ |
| 6 | ||
| 7 | /** @addtogroup libc | |
| 8 | * @{ | |
| 9 | */ | |
| 10 | /** @file | |
| 11 | */ | |
| 12 | ||
| [4805495] | 13 | #ifndef _LIBC_PRODCONS_H_ |
| 14 | #define _LIBC_PRODCONS_H_ | |
| [09696b54] | 15 | |
| 16 | #include <adt/list.h> | |
| 17 | #include <fibril_synch.h> | |
| 18 | ||
| 19 | typedef struct { | |
| 20 | fibril_mutex_t mtx; | |
| 21 | fibril_condvar_t cv; | |
| [b72efe8] | 22 | list_t list; |
| [09696b54] | 23 | } prodcons_t; |
| 24 | ||
| 25 | extern void prodcons_initialize(prodcons_t *); | |
| 26 | extern void prodcons_produce(prodcons_t *, link_t *); | |
| 27 | extern link_t *prodcons_consume(prodcons_t *); | |
| 28 | ||
| 29 | #endif | |
| 30 | ||
| 31 | /** @} | |
| 32 | */ |
Note:
See TracBrowser
for help on using the repository browser.
