Esempio n. 1
0
void
vtbuf_undirty(struct vt_buf *vb, term_rect_t *r)
{

	VTBUF_LOCK(vb);
	*r = vb->vb_dirtyrect;
	vtbuf_make_undirty(vb);
	VTBUF_UNLOCK(vb);
}
Esempio n. 2
0
void
vtbuf_init_early(struct vt_buf *vb)
{

	vb->vb_flags |= VBF_CURSOR;
	vb->vb_roffset = 0;
	vb->vb_curroffset = 0;
	vb->vb_mark_start.tp_row = 0;
	vb->vb_mark_start.tp_col = 0;
	vb->vb_mark_end.tp_row = 0;
	vb->vb_mark_end.tp_col = 0;

	vtbuf_init_rows(vb);
	vtbuf_make_undirty(vb);
	if ((vb->vb_flags & VBF_MTX_INIT) == 0) {
		mtx_init(&vb->vb_lock, "vtbuf", NULL, MTX_SPIN);
		vb->vb_flags |= VBF_MTX_INIT;
	}
}
Esempio n. 3
0
void
vtbuf_init_early(struct vt_buf *vb)
{
	term_rect_t rect;

	vb->vb_flags |= VBF_CURSOR;
	vb->vb_roffset = 0;
	vb->vb_curroffset = 0;
	vb->vb_mark_start.tp_row = 0;
	vb->vb_mark_start.tp_col = 0;
	vb->vb_mark_end.tp_row = 0;
	vb->vb_mark_end.tp_col = 0;

	vtbuf_init_rows(vb);
	rect.tr_begin.tp_row = rect.tr_begin.tp_col = 0;
	rect.tr_end.tp_col = vb->vb_scr_size.tp_col;
	rect.tr_end.tp_row = vb->vb_history_size;
	vtbuf_fill(vb, &rect, VTBUF_SPACE_CHAR(TERMINAL_NORM_ATTR));
	vtbuf_make_undirty(vb);
	if ((vb->vb_flags & VBF_MTX_INIT) == 0) {
		mtx_init(&vb->vb_lock, "vtbuf", NULL, MTX_SPIN);
		vb->vb_flags |= VBF_MTX_INIT;
	}
}