My Project
Loading...
Searching...
No Matches
gop.c File Reference
#include "gop.h"
#include "font8x16.h"
#include "../../intrinsics/atomic.h"
#include "../../includes/me.h"
#include "../../includes/macros.h"

Go to the source code of this file.

Macros

#define FONT8X16_IMPLEMENTATION
#define FONT_SCALE   1

Functions

void gop_clear_screen (GOP_PARAMS *gop, uint32_t color)
char * kstrncat (char *dest, const char *src, size_t max_len)
 Concatenates src onto dest, up to max_len total bytes in dest.
size_t kstrlen (const char *str)
char * kstrcpy (char *dst, const char *src)
char * kstrncpy (char *dst, const char *src, size_t n)
char * kstrtok_r (char *str, const char *delim, char **save_ptr)
int ksnprintf (char *buf, size_t bufsize, const char *fmt,...)
int kstrcmp (const char *s1, const char *s2)
int kstrncmp (const char *s1, const char *s2, size_t length)
void gop_printf (uint32_t color, const char *fmt,...)
void MgAcquireExclusiveGopOwnerShip (void)
void MgReleaseExclusiveGopOwnerShip (void)

Variables

volatile void * ExclusiveOwnerShip = NULL
bool gop_bold_enabled = false
uint32_t cursor_x = 0
uint32_t cursor_y = 0
GOP_PARAMS gop_local
SPINLOCK gop_lock = { 0 }

Macro Definition Documentation

◆ FONT8X16_IMPLEMENTATION

#define FONT8X16_IMPLEMENTATION

Definition at line 8 of file gop.c.

◆ FONT_SCALE

#define FONT_SCALE   1

Definition at line 15 of file gop.c.

Function Documentation

◆ gop_clear_screen()

void gop_clear_screen ( GOP_PARAMS * gop,
uint32_t color )

Definition at line 249 of file gop.c.

◆ gop_printf()

void gop_printf ( uint32_t color,
const char * fmt,
... )

Definition at line 694 of file gop.c.

◆ ksnprintf()

int ksnprintf ( char * buf,
size_t bufsize,
const char * fmt,
... )

Definition at line 546 of file gop.c.

◆ kstrcmp()

int kstrcmp ( const char * s1,
const char * s2 )

Definition at line 657 of file gop.c.

◆ kstrcpy()

char * kstrcpy ( char * dst,
const char * src )

Definition at line 404 of file gop.c.

◆ kstrlen()

size_t kstrlen ( const char * str)

Definition at line 393 of file gop.c.

◆ kstrncat()

char * kstrncat ( char * dest,
const char * src,
size_t max_len )

Concatenates src onto dest, up to max_len total bytes in dest.

Parameters
destDestination buffer (must be mutable)
srcString to append
max_lenTotal size of the destination buffer
Returns
Pointer to dest

Definition at line 365 of file gop.c.

◆ kstrncmp()

int kstrncmp ( const char * s1,
const char * s2,
size_t length )

Definition at line 666 of file gop.c.

◆ kstrncpy()

char * kstrncpy ( char * dst,
const char * src,
size_t n )

Definition at line 416 of file gop.c.

◆ kstrtok_r()

char * kstrtok_r ( char * str,
const char * delim,
char ** save_ptr )

Definition at line 491 of file gop.c.

◆ MgAcquireExclusiveGopOwnerShip()

void MgAcquireExclusiveGopOwnerShip ( void )

Definition at line 794 of file gop.c.

◆ MgReleaseExclusiveGopOwnerShip()

void MgReleaseExclusiveGopOwnerShip ( void )

Definition at line 806 of file gop.c.

Variable Documentation

◆ cursor_x

uint32_t cursor_x = 0

Definition at line 39 of file gop.c.

◆ cursor_y

uint32_t cursor_y = 0

Definition at line 39 of file gop.c.

◆ ExclusiveOwnerShip

volatile void* ExclusiveOwnerShip = NULL

Definition at line 17 of file gop.c.

◆ gop_bold_enabled

bool gop_bold_enabled = false

Definition at line 38 of file gop.c.

◆ gop_local

GOP_PARAMS gop_local
extern

Definition at line 247 of file gop.c.

◆ gop_lock

SPINLOCK gop_lock = { 0 }

Definition at line 675 of file gop.c.