diff options
author | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-01-09 21:22:14 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <lizzy@vlhl.dev> | 2024-01-09 21:26:23 +0100 |
commit | c6e1454fbb872aed5d445d458958943556271529 (patch) | |
tree | 4951f6a95e4ddead170a355940822f8c86b6ed63 /stage3/gfx.c | |
parent | 59f22bc7ce5bbadf62722f3db5c93b45e86e4cca (diff) | |
download | cuddles-c6e1454fbb872aed5d445d458958943556271529.tar.xz |
rename some functions to not use standard names
this avoids confusion when some of those functions differ subtly from their standard versions.
free -> kfree
realloc -> krealloc
malloc -> kmalloc
rationale: kmalloc() behaves different from malloc() in that it will never return NULL. it will panic on OOM. try_kmalloc behaves like the usual malloc.
memcpy -> lmemcpy
memcpy_r -> rmemcpy
rationale: by design, lmemcpy() and rmemcpy() allow memory areas to overlap. the 'l' and 'r' indicate the direction of the copy operation.
Diffstat (limited to 'stage3/gfx.c')
-rw-r--r-- | stage3/gfx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stage3/gfx.c b/stage3/gfx.c index 70a68d9..7fe8df7 100644 --- a/stage3/gfx.c +++ b/stage3/gfx.c @@ -40,7 +40,7 @@ void gfx_draw_img(u16 x, u16 y, u16 w, u16 h, u32 *img) { void *cbeg = (void *) (u64) (gfx_info->framebuffer + y * gfx_info->pitch + x * sizeof(color)); for (u16 yi = 0; yi < h; cbeg += gfx_info->pitch, yi++) - memcpy(cbeg, img + yi * w, w * sizeof(color)); + lmemcpy(cbeg, img + yi * w, w * sizeof(color)); BARRIER_VAR(cbeg); } |