diff --git a/include/gos/raw32.h b/include/gos/raw32.h index 165bc606..155c0b1c 100644 --- a/include/gos/raw32.h +++ b/include/gos/raw32.h @@ -74,7 +74,7 @@ typedef int threadpriority_t; typedef struct { semcount_t cnt; semcount_t limit; - } gfxSem; +} gfxSem; typedef uint32_t gfxMutex; typedef void * gfxThreadHandle; @@ -122,3 +122,4 @@ extern "C" { #endif /* GFX_USE_OS_RAW32 */ #endif /* _GOS_RAW32_H */ + diff --git a/src/gos/raw32.c b/src/gos/raw32.c index 7dd15c27..9a86407e 100644 --- a/src/gos/raw32.c +++ b/src/gos/raw32.c @@ -15,7 +15,6 @@ #include // Prototype for memcpy() - #if GOS_RAW_HEAP_SIZE != 0 static void _gosHeapInit(void); #else @@ -138,6 +137,7 @@ void gfxExit(void) { lastSlot->sz = sz; NextFree(lastSlot) = 0; } + void *gfxAlloc(size_t sz) { register memslot *prev, *p, *new; @@ -270,6 +270,7 @@ void gfxExit(void) { void gfxSystemLock(void) { INTERRUPTS_OFF(); } + void gfxSystemUnlock(void) { INTERRUPTS_ON(); } @@ -454,12 +455,12 @@ typedef struct thread { void * param; // Parameter for the thread function jmp_buf cxt; // The current thread context. // size - sizeof(thread) bytes of stack follow here - } thread; +} thread; typedef struct threadQ { thread *head; thread *tail; - } threadQ; +} threadQ; static threadQ readyQ; // The list of ready threads static threadQ deadQ; // Where we put threads waiting to be deallocated @@ -740,3 +741,4 @@ threadreturn_t gfxThreadWait(gfxThreadHandle th) { } #endif /* GFX_USE_OS_RAW32 */ +