aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules/gos
diff options
context:
space:
mode:
Diffstat (limited to 'demos/modules/gos')
-rw-r--r--demos/modules/gos/threads/main.c6
-rw-r--r--demos/modules/gos/threads_advanced/main.c18
2 files changed, 12 insertions, 12 deletions
diff --git a/demos/modules/gos/threads/main.c b/demos/modules/gos/threads/main.c
index 97b1c7e4..56ea4bb9 100644
--- a/demos/modules/gos/threads/main.c
+++ b/demos/modules/gos/threads/main.c
@@ -26,7 +26,7 @@ threadreturn_t heartbeat1(void* param)
{
(void)param;
- while (TRUE) {
+ while (1) {
DEBUGWRITE("thread 1\n");
gfxSleepMilliseconds(500);
}
@@ -38,7 +38,7 @@ threadreturn_t heartbeat2(void* param)
{
(void)param;
- while (TRUE) {
+ while (1) {
DEBUGWRITE("thread 2\n");
gfxSleepMilliseconds(900);
}
@@ -54,7 +54,7 @@ int main(void)
gfxThreadCreate(0, 2048, NORMAL_PRIORITY, heartbeat1, 0);
gfxThreadCreate(0, 2048, NORMAL_PRIORITY, heartbeat2, 0);
- while (TRUE) {
+ while (1) {
DEBUGWRITE("thread main\n");
gfxSleepMilliseconds(1400);
}
diff --git a/demos/modules/gos/threads_advanced/main.c b/demos/modules/gos/threads_advanced/main.c
index 89cada9f..8527194e 100644
--- a/demos/modules/gos/threads_advanced/main.c
+++ b/demos/modules/gos/threads_advanced/main.c
@@ -65,11 +65,11 @@ gfxThreadHandle thd;
*/
threadreturn_t Thread_function(void* param)
{
- /* Cast the paramter into a bool pointer so we can use it */
- bool_t* doExit = (bool_t*)param;
+ /* Cast the paramter into a gBool pointer so we can use it */
+ gBool* doExit = (gBool*)param;
/* Execute this until we shall be terminated */
- while (*doExit == FALSE) {
+ while (!*doExit) {
DEBUGWRITE("Message from Thread\n");
gfxSleepMilliseconds(500);
}
@@ -84,12 +84,12 @@ threadreturn_t Thread_function(void* param)
*/
void timerCallback(void* param)
{
- /* Cast the paramter into a bool pointer so we can use it */
- bool_t* threadExit = (bool_t*)param;
+ /* Cast the paramter into a gBool pointer so we can use it */
+ gBool* threadExit = (gBool*)param;
/* Ask the Thread to fall over the end */
DEBUGWRITE("Closing thread!\n");
- *threadExit = TRUE;
+ *threadExit = gTrue;
}
/*
@@ -97,7 +97,7 @@ void timerCallback(void* param)
*/
int main(void)
{
- bool_t exitThread = FALSE;
+ gBool exitThread = gFalse;
gfxInit();
@@ -112,9 +112,9 @@ int main(void)
/* 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
*/
- gtimerStart(&gt, timerCallback, (void*)&exitThread, FALSE, 2000);
+ gtimerStart(&gt, timerCallback, (void*)&exitThread, gFalse, 2000);
- while(TRUE) {
+ while(1) {
DEBUGWRITE("Message from main!\n");
gfxSleepMilliseconds(500);
}