Skip to content
Snippets Groups Projects
Commit dd2594b4 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Pull the vstatlock back up a bit now that blinker lock is gone.

Pass the struct vmem_cell to bitmap_draw_one_char() rather than
having it rummage in vmem for it since the caller invariable has
it available.
parent 7291fa08
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4124 failed
...@@ -104,19 +104,18 @@ pthread_mutex_t vstatlock; ...@@ -104,19 +104,18 @@ pthread_mutex_t vstatlock;
/* Forward declarations */ /* Forward declarations */
static int bitmap_loadfont_locked(const char *filename); static int bitmap_loadfont_locked(const char *filename);
static void set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t fg, uint32_t bg); static struct vmem_cell *set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t fg, uint32_t bg);
static int bitmap_attr2palette_locked(uint8_t attr, uint32_t *fgp, uint32_t *bgp); static int bitmap_attr2palette_locked(uint8_t attr, uint32_t *fgp, uint32_t *bgp);
static void cb_drawrect(struct rectlist *data); static void cb_drawrect(struct rectlist *data);
static void request_redraw_locked(void); static void request_redraw_locked(void);
static void request_redraw(void); static void request_redraw(void);
static void memset_u32(void *buf, uint32_t u, size_t len); static void memset_u32(void *buf, uint32_t u, size_t len);
static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos); static int bitmap_draw_one_char(struct vmem_cell *vc, unsigned int xpos, unsigned int ypos);
static void cb_flush(void); static void cb_flush(void);
static int check_redraw(void); static int check_redraw(void);
static void blinker_thread(void *data); static void blinker_thread(void *data);
static __inline void both_screens(struct bitmap_screen** current, struct bitmap_screen** noncurrent); static __inline void both_screens(struct bitmap_screen** current, struct bitmap_screen** noncurrent);
static int update_from_vmem(int force); static int update_from_vmem(int force);
static int bitmap_vmem_puttext_locked(int sx, int sy, int ex, int ey, struct vmem_cell *fill);
static uint32_t color_value(uint32_t col); static uint32_t color_value(uint32_t col);
void bitmap_drv_free_rect(struct rectlist *rect); void bitmap_drv_free_rect(struct rectlist *rect);
...@@ -124,6 +123,7 @@ void bitmap_drv_free_rect(struct rectlist *rect); ...@@ -124,6 +123,7 @@ void bitmap_drv_free_rect(struct rectlist *rect);
/* These functions get called from the driver and ciolib only */ /* These functions get called from the driver and ciolib only */
/**************************************************************/ /**************************************************************/
// vstatlock must be held
static int bitmap_loadfont_locked(const char *filename) static int bitmap_loadfont_locked(const char *filename)
{ {
static char current_filename[MAX_PATH]; static char current_filename[MAX_PATH];
...@@ -253,10 +253,12 @@ error_return: ...@@ -253,10 +253,12 @@ error_return:
/* These functions get called from ciolib only */ /* These functions get called from ciolib only */
/***********************************************/ /***********************************************/
static int bitmap_vmem_puttext_locked(int sx, int sy, int ex, int ey, struct vmem_cell *fill) static int
bitmap_vmem_puttext_locked(int sx, int sy, int ex, int ey, struct vmem_cell *fill)
{ {
int x,y; int x,y;
struct vstat_vmem *vmem_ptr; struct vstat_vmem *vmem_ptr;
struct vmem_cell *vc;
if(!bitmap_initialized) if(!bitmap_initialized)
return(0); return(0);
...@@ -274,22 +276,20 @@ static int bitmap_vmem_puttext_locked(int sx, int sy, int ex, int ey, struct vme ...@@ -274,22 +276,20 @@ static int bitmap_vmem_puttext_locked(int sx, int sy, int ex, int ey, struct vme
|| fill==NULL) || fill==NULL)
return(0); return(0);
pthread_mutex_lock(&vstatlock);
vmem_ptr = get_vmem(&vstat); vmem_ptr = get_vmem(&vstat);
pthread_mutex_unlock(&vstatlock);
for(y=sy-1;y<ey;y++) { for(y=sy-1;y<ey;y++) {
for(x=sx-1;x<ex;x++) { for(x=sx-1;x<ex;x++) {
memcpy(&vmem_ptr->vmem[y*cio_textinfo.screenwidth+x], fill++, sizeof(*fill)); vc = &vmem_ptr->vmem[y*cio_textinfo.screenwidth+x];
bitmap_draw_one_char(x+1, y+1); memcpy(vc, fill++, sizeof(*fill));
bitmap_draw_one_char(vc, x+1, y+1);
} }
} }
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr); release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock);
return(1); return(1);
} }
static void // vstatlock must be held
static struct vmem_cell *
set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t fg, uint32_t bg) set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t fg, uint32_t bg)
{ {
int altfont; int altfont;
...@@ -298,12 +298,10 @@ set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t f ...@@ -298,12 +298,10 @@ set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t f
bitmap_attr2palette_locked(cell>>8, fg == 0xffffff ? &fg : NULL, bg == 0xffffff ? &bg : NULL); bitmap_attr2palette_locked(cell>>8, fg == 0xffffff ? &fg : NULL, bg == 0xffffff ? &bg : NULL);
altfont = (cell>>11 & 0x01) | ((cell>>14) & 0x02); altfont = (cell>>11 & 0x01) | ((cell>>14) & 0x02);
pthread_mutex_lock(&vstatlock);
if (!vstat.bright_altcharset) if (!vstat.bright_altcharset)
altfont &= ~0x01; altfont &= ~0x01;
if (!vstat.blink_altcharset) if (!vstat.blink_altcharset)
altfont &= ~0x02; altfont &= ~0x02;
pthread_mutex_unlock(&vstatlock);
font=current_font[altfont]; font=current_font[altfont];
if (font == -99) if (font == -99)
font = default_font; font = default_font;
...@@ -315,6 +313,7 @@ set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t f ...@@ -315,6 +313,7 @@ set_vmem_cell(struct vstat_vmem *vmem_ptr, size_t pos, uint16_t cell, uint32_t f
vmem_ptr->vmem[pos].fg = fg; vmem_ptr->vmem[pos].fg = fg;
vmem_ptr->vmem[pos].bg = bg; vmem_ptr->vmem[pos].bg = bg;
vmem_ptr->vmem[pos].font = font; vmem_ptr->vmem[pos].font = font;
return &vmem_ptr->vmem[pos];
} }
static int bitmap_attr2palette_locked(uint8_t attr, uint32_t *fgp, uint32_t *bgp) static int bitmap_attr2palette_locked(uint8_t attr, uint32_t *fgp, uint32_t *bgp)
...@@ -492,13 +491,14 @@ static void memset_u32(void *buf, uint32_t u, size_t len) ...@@ -492,13 +491,14 @@ static void memset_u32(void *buf, uint32_t u, size_t len)
} }
} }
static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos) // vstatlock must be held
static int bitmap_draw_one_char(struct vmem_cell *vc, unsigned int xpos, unsigned int ypos)
{ {
uint32_t fg; uint32_t fg;
uint32_t bg; uint32_t bg;
int fdw; int fdw;
int xoffset=(xpos-1)*vstat.charwidth; int xoffset;
int yoffset=(ypos-1)*vstat.charheight; int yoffset;
int x; int x;
int fdx; int fdx;
uint8_t fb = 0; uint8_t fb = 0;
...@@ -508,61 +508,38 @@ static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos) ...@@ -508,61 +508,38 @@ static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos)
int pixeloffset; int pixeloffset;
unsigned char *this_font; unsigned char *this_font;
WORD sch; WORD sch;
struct vstat_vmem *vmem_ptr;
BOOL draw_fg = TRUE; BOOL draw_fg = TRUE;
size_t vmo;
size_t rsz; size_t rsz;
int charwidth, charheight, no_blink, flags;
uint8_t *forced_font;
if(!bitmap_initialized) { if(!bitmap_initialized) {
return(-1); return(-1);
} }
pthread_mutex_lock(&vstatlock); xoffset=(xpos-1)*vstat.charwidth;
charwidth = vstat.charwidth; yoffset=(ypos-1)*vstat.charheight;
charheight = vstat.charheight; draw_fg = ((!(vc->legacy_attr & 0x80)) || vstat.no_blink);
no_blink = vstat.no_blink; sch = vc->ch;
forced_font = vstat.forced_font; fg = vc->fg;
flags = vstat.flags; bg = vc->bg;
vmem_ptr = get_vmem(&vstat);
pthread_mutex_unlock(&vstatlock);
if(!vmem_ptr) { if (vstat.forced_font) {
pthread_mutex_lock(&vstatlock); this_font = vstat.forced_font;
release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock);
return(-1);
}
vmo = (ypos-1)*cio_textinfo.screenwidth+(xpos-1);
sch = vmem_ptr->vmem[vmo].legacy_attr << 8 | vmem_ptr->vmem[vmo].ch;
fg = vmem_ptr->vmem[vmo].fg;
bg = vmem_ptr->vmem[vmo].bg;
draw_fg = ((!(sch & 0x8000)) || no_blink);
sch &= 0xff;
if (forced_font) {
this_font = forced_font;
} }
else { else {
if (current_font[0] == -1) if (current_font[0] == -1)
this_font = font[0]; this_font = font[0];
else { else {
switch (charheight) { switch (vstat.charheight) {
case 8: case 8:
this_font = (unsigned char *)conio_fontdata[vmem_ptr->vmem[vmo].font].eight_by_eight; this_font = (unsigned char *)conio_fontdata[vc->font].eight_by_eight;
break; break;
case 14: case 14:
this_font = (unsigned char *)conio_fontdata[vmem_ptr->vmem[vmo].font].eight_by_fourteen; this_font = (unsigned char *)conio_fontdata[vc->font].eight_by_fourteen;
break; break;
case 16: case 16:
this_font = (unsigned char *)conio_fontdata[vmem_ptr->vmem[vmo].font].eight_by_sixteen; this_font = (unsigned char *)conio_fontdata[vc->font].eight_by_sixteen;
break; break;
default: default:
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock);
return(-1); return(-1);
} }
} }
...@@ -570,38 +547,35 @@ static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos) ...@@ -570,38 +547,35 @@ static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos)
if (this_font == NULL) { if (this_font == NULL) {
this_font = font[0]; this_font = font[0];
} }
fdw = charwidth - (flags & VIDMODES_FLAG_EXPAND) ? 1 : 0; fdw = vstat.charwidth - (vstat.flags & VIDMODES_FLAG_EXPAND) ? 1 : 0;
fontoffset=(sch) * (charheight * ((fdw + 7) / 8)); fontoffset=(sch) * (vstat.charheight * ((fdw + 7) / 8));
pthread_mutex_lock(&screenlock); pthread_mutex_lock(&screenlock);
if ((xoffset + charwidth > screena.screenwidth) || (yoffset + charheight > screena.screenheight) || if ((xoffset + vstat.charwidth > screena.screenwidth) || (yoffset + vstat.charheight > screena.screenheight) ||
(xoffset + charwidth > screenb.screenwidth) || (yoffset + charheight > screenb.screenheight)) { (xoffset + vstat.charwidth > screenb.screenwidth) || (yoffset + vstat.charheight > screenb.screenheight)) {
pthread_mutex_unlock(&screenlock); pthread_mutex_unlock(&screenlock);
return(-1); return(-1);
} }
if((!screena.rect) || (!screenb.rect)) { if((!screena.rect) || (!screenb.rect)) {
pthread_mutex_unlock(&screenlock); pthread_mutex_unlock(&screenlock);
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock);
return(-1); return(-1);
} }
pixeloffset = PIXEL_OFFSET(screena, xoffset, yoffset); pixeloffset = PIXEL_OFFSET(screena, xoffset, yoffset);
rsz = screena.screenwidth - charwidth; rsz = screena.screenwidth - vstat.charwidth;
for(y=0; y<charheight; y++) { for (y = 0; y < vstat.charheight; y++) {
for(x=0; x<charwidth; x++) { for(x = 0; x < vstat.charwidth; x++) {
fdx = x; fdx = x;
fb = this_font[fontoffset]; fb = this_font[fontoffset];
if ((x & 0x07) == 7) if ((x & 0x07) == 7)
fontoffset++; fontoffset++;
if (flags & VIDMODES_FLAG_EXPAND) { if (vstat.flags & VIDMODES_FLAG_EXPAND) {
if (x == charwidth - 1) { if (x == vstat.charwidth - 1) {
fontoffset--; fontoffset--;
fdx--; fdx--;
if (!(flags & VIDMODES_FLAG_LINE_GRAPHICS_EXPAND)) { if (!(vstat.flags & VIDMODES_FLAG_LINE_GRAPHICS_EXPAND)) {
fb = 0; fb = 0;
} }
else if ((sch) >= 0xC0 && (sch) <= 0xDF) { else if ((sch) >= 0xC0 && (sch) <= 0xDF) {
...@@ -646,9 +620,6 @@ static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos) ...@@ -646,9 +620,6 @@ static int bitmap_draw_one_char(unsigned int xpos, unsigned int ypos)
pixeloffset += rsz; pixeloffset += rsz;
} }
pthread_mutex_unlock(&screenlock); pthread_mutex_unlock(&screenlock);
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock);
return(0); return(0);
} }
...@@ -843,7 +814,6 @@ static int update_from_vmem(int force) ...@@ -843,7 +814,6 @@ static int update_from_vmem(int force)
/* Get vmem pointer */ /* Get vmem pointer */
vmem_ptr = get_vmem(&vstat); vmem_ptr = get_vmem(&vstat);
cols = vstat.cols; cols = vstat.cols;
pthread_mutex_unlock(&vstatlock);
/* /*
* Now we go through each character seeing if it's changed (or force is set) * Now we go through each character seeing if it's changed (or force is set)
...@@ -862,12 +832,11 @@ static int update_from_vmem(int force) ...@@ -862,12 +832,11 @@ static int update_from_vmem(int force)
|| ((vmem_ptr->vmem[pos].legacy_attr & 0x80) && blink_attr_changed) || ((vmem_ptr->vmem[pos].legacy_attr & 0x80) && blink_attr_changed)
|| ((vmem_ptr->vmem[pos].legacy_attr & 0x08) && bright_attr_changed)) /* Bright char */ || ((vmem_ptr->vmem[pos].legacy_attr & 0x08) && bright_attr_changed)) /* Bright char */
{ {
bitmap_draw_one_char(x+1,y+1); bitmap_draw_one_char(&vmem_ptr->vmem[pos], x+1,y+1);
} }
pos++; pos++;
} }
} }
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr); release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
...@@ -887,31 +856,29 @@ int bitmap_puttext(int sx, int sy, int ex, int ey, void *fill) ...@@ -887,31 +856,29 @@ int bitmap_puttext(int sx, int sy, int ex, int ey, void *fill)
int ret = 1; int ret = 1;
uint16_t *buf = fill; uint16_t *buf = fill;
struct vstat_vmem *vmem_ptr; struct vstat_vmem *vmem_ptr;
struct vmem_cell *vc;
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
vmem_ptr = get_vmem(&vstat); vmem_ptr = get_vmem(&vstat);
pthread_mutex_unlock(&vstatlock);
for(y=sy-1;y<ey;y++) { for(y=sy-1;y<ey;y++) {
for(x=sx-1;x<ex;x++) { for(x=sx-1;x<ex;x++) {
set_vmem_cell(vmem_ptr, y*cio_textinfo.screenwidth+x, *(buf++), 0x00ffffff, 0x00ffffff); vc = set_vmem_cell(vmem_ptr, y*cio_textinfo.screenwidth+x, *(buf++), 0x00ffffff, 0x00ffffff);
bitmap_draw_one_char(x+1, y+1); bitmap_draw_one_char(vc, x+1, y+1);
} }
} }
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr); release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
return ret; return ret;
} }
int bitmap_vmem_puttext(int sx, int sy, int ex, int ey, struct vmem_cell *fill) int
bitmap_vmem_puttext(int sx, int sy, int ex, int ey, struct vmem_cell *fill)
{ {
int ret; int ret;
if(!bitmap_initialized) pthread_mutex_lock(&vstatlock);
return(0);
ret = bitmap_vmem_puttext_locked(sx, sy, ex, ey, fill); ret = bitmap_vmem_puttext_locked(sx, sy, ex, ey, fill);
pthread_mutex_lock(&vstatlock);
return ret; return ret;
} }
...@@ -994,11 +961,11 @@ int bitmap_setfont(int font, int force, int font_num) ...@@ -994,11 +961,11 @@ int bitmap_setfont(int font, int force, int font_num)
int changemode=0; int changemode=0;
int newmode=-1; int newmode=-1;
struct text_info ti; struct text_info ti;
struct vmem_cell *old;
int ow,oh; int ow,oh;
int row,col; int row,col;
struct vmem_cell *new;
int attr; int attr;
struct vmem_cell *old;
struct vmem_cell *new;
struct vmem_cell *pold; struct vmem_cell *pold;
struct vmem_cell *pnew; struct vmem_cell *pnew;
...@@ -1108,7 +1075,7 @@ int bitmap_setfont(int font, int force, int font_num) ...@@ -1108,7 +1075,7 @@ int bitmap_setfont(int font, int force, int font_num)
old++; old++;
} }
} }
bitmap_vmem_puttext(1,1,ti.screenwidth,ti.screenheight,pnew); bitmap_vmem_puttext_locked(1,1,ti.screenwidth,ti.screenheight,pnew);
free(pnew); free(pnew);
free(pold); free(pold);
} }
...@@ -1224,7 +1191,6 @@ int bitmap_movetext(int x, int y, int ex, int ey, int tox, int toy) ...@@ -1224,7 +1191,6 @@ int bitmap_movetext(int x, int y, int ex, int ey, int tox, int toy)
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
vmem_ptr = get_vmem(&vstat); vmem_ptr = get_vmem(&vstat);
pthread_mutex_unlock(&vstatlock);
if (width == cio_textinfo.screenwidth) { if (width == cio_textinfo.screenwidth) {
memmove(&(vmem_ptr->vmem[sourcepos+destoffset]), &(vmem_ptr->vmem[sourcepos]), sizeof(vmem_ptr->vmem[0])*width*height); memmove(&(vmem_ptr->vmem[sourcepos+destoffset]), &(vmem_ptr->vmem[sourcepos]), sizeof(vmem_ptr->vmem[0])*width*height);
} }
...@@ -1237,8 +1203,6 @@ int bitmap_movetext(int x, int y, int ex, int ey, int tox, int toy) ...@@ -1237,8 +1203,6 @@ int bitmap_movetext(int x, int y, int ex, int ey, int tox, int toy)
} }
bitmap_movetext_screen(x, y, tox, toy, direction, height, width); bitmap_movetext_screen(x, y, tox, toy, direction, height, width);
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr); release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
...@@ -1250,18 +1214,17 @@ void bitmap_clreol(void) ...@@ -1250,18 +1214,17 @@ void bitmap_clreol(void)
int pos,x; int pos,x;
WORD fill=(cio_textinfo.attribute<<8)|' '; WORD fill=(cio_textinfo.attribute<<8)|' ';
struct vstat_vmem *vmem_ptr; struct vstat_vmem *vmem_ptr;
struct vmem_cell *vc;
int row; int row;
row = cio_textinfo.cury + cio_textinfo.wintop - 1; row = cio_textinfo.cury + cio_textinfo.wintop - 1;
pos=(row - 1)*cio_textinfo.screenwidth; pos=(row - 1)*cio_textinfo.screenwidth;
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
vmem_ptr = get_vmem(&vstat); vmem_ptr = get_vmem(&vstat);
pthread_mutex_unlock(&vstatlock);
for(x=cio_textinfo.curx+cio_textinfo.winleft-2; x<cio_textinfo.winright; x++) { for(x=cio_textinfo.curx+cio_textinfo.winleft-2; x<cio_textinfo.winright; x++) {
set_vmem_cell(vmem_ptr, pos+x, fill, ciolib_fg, ciolib_bg); vc = set_vmem_cell(vmem_ptr, pos+x, fill, ciolib_fg, ciolib_bg);
bitmap_draw_one_char(x+1, row); bitmap_draw_one_char(vc, x+1, row);
} }
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr); release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
} }
...@@ -1271,20 +1234,19 @@ void bitmap_clrscr(void) ...@@ -1271,20 +1234,19 @@ void bitmap_clrscr(void)
int x,y; int x,y;
WORD fill=(cio_textinfo.attribute<<8)|' '; WORD fill=(cio_textinfo.attribute<<8)|' ';
struct vstat_vmem *vmem_ptr; struct vstat_vmem *vmem_ptr;
struct vmem_cell *vc;
int rows, cols; int rows, cols;
pthread_mutex_lock(&vstatlock); pthread_mutex_lock(&vstatlock);
vmem_ptr = get_vmem(&vstat); vmem_ptr = get_vmem(&vstat);
rows = vstat.rows; rows = vstat.rows;
cols = vstat.cols; cols = vstat.cols;
pthread_mutex_unlock(&vstatlock);
for(y = cio_textinfo.wintop-1; y < cio_textinfo.winbottom && y < rows; y++) { for(y = cio_textinfo.wintop-1; y < cio_textinfo.winbottom && y < rows; y++) {
for(x=cio_textinfo.winleft-1; x<cio_textinfo.winright && x < cols; x++) { for(x=cio_textinfo.winleft-1; x<cio_textinfo.winright && x < cols; x++) {
set_vmem_cell(vmem_ptr, y*cio_textinfo.screenwidth+x, fill, ciolib_fg, ciolib_bg); vc = set_vmem_cell(vmem_ptr, y*cio_textinfo.screenwidth+x, fill, ciolib_fg, ciolib_bg);
bitmap_draw_one_char(x+1, y+1); bitmap_draw_one_char(vc, x+1, y+1);
} }
} }
pthread_mutex_lock(&vstatlock);
release_vmem(vmem_ptr); release_vmem(vmem_ptr);
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
} }
......
...@@ -321,6 +321,7 @@ static struct vstat_vmem *new_vmem(int cols, int rows, bool palette) ...@@ -321,6 +321,7 @@ static struct vstat_vmem *new_vmem(int cols, int rows, bool palette)
free(ret); free(ret);
return NULL; return NULL;
} }
return ret; return ret;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment