aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-02-03 18:23:53 +1000
committerinmarket <andrewh@inmarket.com.au>2014-02-03 18:23:53 +1000
commitf26581dc7e85f77393143a44c0c3eb3eef0da8b4 (patch)
tree9a83c5eaf1abe2cc61b216012f997e6891840a19 /src/gos
parentb6daaabf32bf2092689e0732ca4486f25e80317f (diff)
parentd869d9b3b80cb9ab2314840b2fa274e89e5342db (diff)
downloaduGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.tar.gz
uGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.tar.bz2
uGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.zip
Merge branch 'master' into freertos
Diffstat (limited to 'src/gos')
-rw-r--r--src/gos/chibios.c9
-rw-r--r--src/gos/linux.c8
-rw-r--r--src/gos/osx.c8
-rw-r--r--src/gos/raw32.c10
-rw-r--r--src/gos/win32.c8
5 files changed, 36 insertions, 7 deletions
diff --git a/src/gos/chibios.c b/src/gos/chibios.c
index 30a2b228..cf02b3e2 100644
--- a/src/gos/chibios.c
+++ b/src/gos/chibios.c
@@ -22,8 +22,8 @@
#error "GOS: CH_USE_SEMAPHORES must be defined in chconf.h"
#endif
-/* Our module initialiser */
-void _gosInit(void) {
+void _gosInit(void)
+{
/* Don't initialise if the user already has */
if (!chThdSelf()) {
halInit();
@@ -31,6 +31,11 @@ void _gosInit(void) {
}
}
+void _gosDeinit(void)
+{
+ /* ToDo */
+}
+
void *gfxRealloc(void *ptr, size_t oldsz, size_t newsz) {
void *np;
diff --git a/src/gos/linux.c b/src/gos/linux.c
index 97409364..9b4914d5 100644
--- a/src/gos/linux.c
+++ b/src/gos/linux.c
@@ -20,10 +20,16 @@
static gfxMutex SystemMutex;
-void _gosInit(void) {
+void _gosInit(void)
+{
gfxMutexInit(&SystemMutex);
}
+void _gosDeinit(void)
+{
+ /* ToDo */
+}
+
void gfxSystemLock(void) {
gfxMutexEnter(&SystemMutex);
}
diff --git a/src/gos/osx.c b/src/gos/osx.c
index a5560b4e..249147d1 100644
--- a/src/gos/osx.c
+++ b/src/gos/osx.c
@@ -37,10 +37,16 @@ void get_ticks(mach_timespec_t *mts){
}
-void _gosInit(void) {
+void _gosInit(void)
+{
gfxMutexInit(&SystemMutex);
}
+void _gosDeinit(void)
+{
+ /* ToDo */
+}
+
void gfxSystemLock(void) {
gfxMutexEnter(&SystemMutex);
}
diff --git a/src/gos/raw32.c b/src/gos/raw32.c
index 5a65ea86..61d09761 100644
--- a/src/gos/raw32.c
+++ b/src/gos/raw32.c
@@ -26,7 +26,8 @@ static void _gosThreadsInit(void);
* Initialise
*********************************************************/
-void _gosInit(void) {
+void _gosInit(void)
+{
// Set up the heap allocator
_gosHeapInit();
@@ -34,6 +35,11 @@ void _gosInit(void) {
_gosThreadsInit();
}
+void _gosDeinit(void)
+{
+ /* ToDo */
+}
+
/*********************************************************
* For WIn32 emulation - automatically add the tick functions
* the user would normally have to provide for bare metal.
@@ -542,7 +548,7 @@ static void _gosThreadsInit(void) {
char * framebase;
// Allocate a buffer to store our test data
- pframeinfo = (saveloc *)gfxAlloc(sizeof(saveloc)*2);
+ pframeinfo = gfxAlloc(sizeof(saveloc)*2);
// Get details of the stack frame from within a function
get_stack_state_in_fn();
diff --git a/src/gos/win32.c b/src/gos/win32.c
index a05e5c30..3a3f2517 100644
--- a/src/gos/win32.c
+++ b/src/gos/win32.c
@@ -17,7 +17,13 @@
static HANDLE SystemMutex;
-void _gosInit(void) {
+void _gosInit(void)
+{
+
+}
+
+void _gosDeinit(void)
+{
}