mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Export sbuf_drain to orchestrate lock and drain action
While exporting large amounts of data to a sysctl request, datastructures may need to be locked. Exporting the sbuf_drain function allows the coordination between drain events and held locks, to avoid stalls. PR: 254333 Reviewed By: jhb MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29481
This commit is contained in:
parent
baacf70137
commit
c804c8f2c5
2 changed files with 2 additions and 1 deletions
|
|
@ -383,7 +383,7 @@ sbuf_set_drain(struct sbuf *s, sbuf_drain_func *func, void *ctx)
|
|||
/*
|
||||
* Call the drain and process the return.
|
||||
*/
|
||||
static int
|
||||
int
|
||||
sbuf_drain(struct sbuf *s)
|
||||
{
|
||||
int len;
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ int sbuf_vprintf(struct sbuf *, const char *, __va_list)
|
|||
int sbuf_nl_terminate(struct sbuf *);
|
||||
int sbuf_putc(struct sbuf *, int);
|
||||
void sbuf_set_drain(struct sbuf *, sbuf_drain_func *, void *);
|
||||
int sbuf_drain(struct sbuf *);
|
||||
int sbuf_trim(struct sbuf *);
|
||||
int sbuf_error(const struct sbuf *);
|
||||
int sbuf_finish(struct sbuf *);
|
||||
|
|
|
|||
Loading…
Reference in a new issue