libk  bufflush.fn.c at [164a1a5cfe]

File mod/kstr/bufflush.fn.c artifact 45cb80b779 part of check-in 164a1a5cfe


#include <k/type.h>
#include <k/str.h>
#include <k/io.h>

kiocond
ksbufflush(ksbuf* b) {
	ksraw str = {b -> cur - b -> buf, b -> buf};
	b -> cur = b -> buf;
	return kiosend(b -> channel, str, null);
}