/* Specifically, this function calculates the number of bytes that may be written to a given  */
static size_t spair_write_avail(struct spair *spair)
/* Specifically, this function calculates the number of bytes that may be written to a given  */
static size_t spair_write_avail(struct spair *spair)
{
	struct spair *const remote = z_get_fd_obj(spair->remote,
		(const struct fd_op_vtable *)&spair_fd_op_vtable, 0);
	if (remote == NULL) {
		return 0;
	}
	return k_pipe_write_avail(&remote->recv_q);
}