aboutsummaryrefslogtreecommitdiffstats
path: root/src/gos
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-02-02 19:24:43 +0100
committerJoel Bodenmann <joel@unormal.org>2014-02-02 19:24:43 +0100
commita11f7da53638ee4fe282c7b5725294ca1780f9bf (patch)
tree9259f98c7a7cceef766d332311f77eb9278a2eeb /src/gos
parentfababafc9a4fce83c4a6879624a8caa38ea9f438 (diff)
downloaduGFX-a11f7da53638ee4fe282c7b5725294ca1780f9bf.tar.gz
uGFX-a11f7da53638ee4fe282c7b5725294ca1780f9bf.tar.bz2
uGFX-a11f7da53638ee4fe282c7b5725294ca1780f9bf.zip
added deinit() routines for all modules (not implemented so far)
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.c8
-rw-r--r--src/gos/win32.c8
5 files changed, 35 insertions, 6 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 5e11064c..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.
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)
+{
}