aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2018-07-08 15:32:26 +1000
committerinmarket <andrewh@inmarket.com.au>2018-07-08 15:32:26 +1000
commit1fc4180d41a77088bbb2c0ce020d5ff7ab88c16e (patch)
tree3ffb1a5fd2d8e7f08b7b45938824ecbab1170288 /demos
parent93da5a0578e7f16ea846eb257f36a24e316ef8d4 (diff)
downloaduGFX-1fc4180d41a77088bbb2c0ce020d5ff7ab88c16e.tar.gz
uGFX-1fc4180d41a77088bbb2c0ce020d5ff7ab88c16e.tar.bz2
uGFX-1fc4180d41a77088bbb2c0ce020d5ff7ab88c16e.zip
gThreadpriorityLow/Normal/High to replace LOW_/NORMAL_/HIGH_PRIORITY
Diffstat (limited to 'demos')
-rw-r--r--demos/3rdparty/notepad-2/notepadApp.h2
-rw-r--r--demos/3rdparty/notepad-2/notepadCore.h2
-rw-r--r--demos/applications/combo/bounce.c2
-rw-r--r--demos/applications/combo/mandelbrot.c2
-rw-r--r--demos/games/justget10/jg10.c2
-rw-r--r--demos/games/minesweeper/mines.c2
-rw-r--r--demos/games/tetris/tetris.c2
-rw-r--r--demos/modules/gos/threads/main.c4
-rw-r--r--demos/modules/gos/threads_advanced/main.c2
-rw-r--r--demos/tools/uGFXnetDisplay/main.c4
10 files changed, 12 insertions, 12 deletions
diff --git a/demos/3rdparty/notepad-2/notepadApp.h b/demos/3rdparty/notepad-2/notepadApp.h
index 04405223..661aaaf2 100644
--- a/demos/3rdparty/notepad-2/notepadApp.h
+++ b/demos/3rdparty/notepad-2/notepadApp.h
@@ -38,7 +38,7 @@
#include "notepadCore.h"
#include "notepadUIDefines.h"
-#define NPAD_THD_PRIO NORMAL_PRIORITY
+#define NPAD_THD_PRIO gThreadpriorityNormal
#define NPAD_THD_WA_SIZE 512
void nSetColorScheme(NColorScheme sch);
diff --git a/demos/3rdparty/notepad-2/notepadCore.h b/demos/3rdparty/notepad-2/notepadCore.h
index dc75be3e..e4b78cdc 100644
--- a/demos/3rdparty/notepad-2/notepadCore.h
+++ b/demos/3rdparty/notepad-2/notepadCore.h
@@ -37,7 +37,7 @@
/* Configuration */
#define NCORE_THD_STACK_SIZE 256
-#define NCORE_THD_PRIO NORMAL_PRIORITY
+#define NCORE_THD_PRIO gThreadpriorityNormal
#define NCORE_MODE_DRAW 0
#define NCORE_MODE_ERASE 1
diff --git a/demos/applications/combo/bounce.c b/demos/applications/combo/bounce.c
index 1ca82d00..12f95f61 100644
--- a/demos/applications/combo/bounce.c
+++ b/demos/applications/combo/bounce.c
@@ -153,7 +153,7 @@ void doBounce(GHandle parent, gBool start) {
if (start) {
run = gTrue;
gh = parent;
- thread = gfxThreadCreate(0, 0x200, LOW_PRIORITY, task, 0);
+ thread = gfxThreadCreate(0, 0x200, gThreadpriorityLow, task, 0);
} else if (run) {
run = gFalse;
gfxThreadWait(thread);
diff --git a/demos/applications/combo/mandelbrot.c b/demos/applications/combo/mandelbrot.c
index 8033957c..866131e3 100644
--- a/demos/applications/combo/mandelbrot.c
+++ b/demos/applications/combo/mandelbrot.c
@@ -89,7 +89,7 @@ void doMandlebrot(GHandle parent, gBool start) {
if (start) {
run = gTrue;
gh = parent;
- thread = gfxThreadCreate(0, 0x400, LOW_PRIORITY, task, 0);
+ thread = gfxThreadCreate(0, 0x400, gThreadpriorityLow, task, 0);
} else if (run) {
run = gFalse;
gfxThreadWait(thread);
diff --git a/demos/games/justget10/jg10.c b/demos/games/justget10/jg10.c
index d824ca06..d6ec0e2e 100644
--- a/demos/games/justget10/jg10.c
+++ b/demos/games/justget10/jg10.c
@@ -460,7 +460,7 @@ void jg10Start(void) {
#endif
initField();
guiCreate();
- gfxThreadCreate(0, 1024, NORMAL_PRIORITY, thdJg10, 0);
+ gfxThreadCreate(0, 1024, gThreadpriorityNormal, thdJg10, 0);
while (!jg10GameOver) {
gfxSleepMilliseconds(100);
}
diff --git a/demos/games/minesweeper/mines.c b/demos/games/minesweeper/mines.c
index 19d8c373..5a0b4c41 100644
--- a/demos/games/minesweeper/mines.c
+++ b/demos/games/minesweeper/mines.c
@@ -382,7 +382,7 @@ void minesStart(void)
#endif
initField();
- gfxThreadCreate(0, 1024, NORMAL_PRIORITY, thdMines, 0);
+ gfxThreadCreate(0, 1024, gThreadpriorityNormal, thdMines, 0);
while (!minesGameOver) {
gfxSleepMilliseconds(100);
}
diff --git a/demos/games/tetris/tetris.c b/demos/games/tetris/tetris.c
index ad8debd7..cd4cc315 100644
--- a/demos/games/tetris/tetris.c
+++ b/demos/games/tetris/tetris.c
@@ -498,7 +498,7 @@ void tetrisStart(void) {
tetrisGameOver = gFalse;
printGameOver(); // removes "Game Over!" if tetrisGameOver == gFalse
tetrisPreviousGameTime = gfxSystemTicks();
- gfxThreadCreate(0, 1024, NORMAL_PRIORITY, thdTetris, 0);
+ gfxThreadCreate(0, 1024, gThreadpriorityNormal, thdTetris, 0);
while (!tetrisGameOver) {
gfxSleepMilliseconds(1000);
}
diff --git a/demos/modules/gos/threads/main.c b/demos/modules/gos/threads/main.c
index 4ef81411..1caef39b 100644
--- a/demos/modules/gos/threads/main.c
+++ b/demos/modules/gos/threads/main.c
@@ -51,8 +51,8 @@ int main(void)
gfxInit();
// Give this plenty of stack. Stack size optimisation should be a production change only
- gfxThreadCreate(0, 2048, NORMAL_PRIORITY, heartbeat1, 0);
- gfxThreadCreate(0, 2048, NORMAL_PRIORITY, heartbeat2, 0);
+ gfxThreadCreate(0, 2048, gThreadpriorityNormal, heartbeat1, 0);
+ gfxThreadCreate(0, 2048, gThreadpriorityNormal, heartbeat2, 0);
while (1) {
DEBUGWRITE("thread main\n");
diff --git a/demos/modules/gos/threads_advanced/main.c b/demos/modules/gos/threads_advanced/main.c
index 0ae8649c..dd4332ed 100644
--- a/demos/modules/gos/threads_advanced/main.c
+++ b/demos/modules/gos/threads_advanced/main.c
@@ -107,7 +107,7 @@ int main(void)
/* Create a static thread from the default heap with normal priority.
* We pass a the parameter to the thread which tells the thread whether to return or not
*/
- thd = gfxThreadCreate(NULL, 2048, NORMAL_PRIORITY, Thread_function, (void*)&exitThread);
+ thd = gfxThreadCreate(NULL, 2048, gThreadpriorityNormal, Thread_function, (void*)&exitThread);
/* Start the timer. The callback function will be called once after 2000ms
* We will pass the thread handle as a parameter so the timer can ask the thread to terminate
diff --git a/demos/tools/uGFXnetDisplay/main.c b/demos/tools/uGFXnetDisplay/main.c
index dc396cfb..b24c40ba 100644
--- a/demos/tools/uGFXnetDisplay/main.c
+++ b/demos/tools/uGFXnetDisplay/main.c
@@ -81,7 +81,7 @@
#define StartSockets() Start_LWIP();
#else
#include "lwipthread.h"
- #define StartSockets() gfxThreadClose(gfxThreadCreate(wa_lwip_thread, LWIP_THREAD_STACK_SIZE, NORMAL_PRIORITY, lwip_thread, 0))
+ #define StartSockets() gfxThreadClose(gfxThreadCreate(wa_lwip_thread, LWIP_THREAD_STACK_SIZE, gThreadpriorityNormal, lwip_thread, 0))
#endif
#if !LWIP_SOCKET
@@ -358,7 +358,7 @@ int main(proto_args) {
#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE
// Start the mouse thread if needed
if (cmd[3])
- gfxThreadClose(gfxThreadCreate(waNetThread, sizeof(waNetThread), HIGH_PRIORITY, NetThread, 0));
+ gfxThreadClose(gfxThreadCreate(waNetThread, sizeof(waNetThread), gThreadpriorityHigh, NetThread, 0));
#endif
// Process incoming instructions