Removed DUSK_ prefix
This commit is contained in:
@@ -27,7 +27,7 @@ void consoleInit() {
|
||||
|
||||
consolePrint(" = Dawn Console = ");
|
||||
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
threadInit(&CONSOLE.thread, consoleInputThread);
|
||||
threadMutexInit(&CONSOLE.execMutex);
|
||||
threadStartRequest(&CONSOLE.thread);
|
||||
@@ -75,7 +75,7 @@ void consolePrint(const char_t *message, ...) {
|
||||
}
|
||||
|
||||
void consoleExec(const char_t *line) {
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
threadMutexLock(&CONSOLE.execMutex);
|
||||
#endif
|
||||
|
||||
@@ -279,13 +279,13 @@ void consoleExec(const char_t *line) {
|
||||
}
|
||||
}
|
||||
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
threadMutexUnlock(&CONSOLE.execMutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void consoleUpdate() {
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
threadMutexLock(&CONSOLE.execMutex);
|
||||
#endif
|
||||
|
||||
@@ -298,13 +298,13 @@ void consoleUpdate() {
|
||||
// Clear the exec buffer
|
||||
CONSOLE.execBufferCount = 0;
|
||||
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
threadMutexUnlock(&CONSOLE.execMutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
void consoleDispose(void) {
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
threadStop(&CONSOLE.thread);
|
||||
threadMutexDispose(&CONSOLE.execMutex);
|
||||
#endif
|
||||
@@ -312,7 +312,7 @@ void consoleDispose(void) {
|
||||
consolePrint(" = Console shutting down = ");
|
||||
}
|
||||
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
void consoleInputThread(thread_t *thread) {
|
||||
assertNotNull(thread, "Thread cannot be NULL.");
|
||||
|
||||
@@ -325,7 +325,7 @@ void consoleDispose(void) {
|
||||
};
|
||||
|
||||
while(!threadShouldStop(thread) && ENGINE.running) {
|
||||
int32_t rc = poll(&pfd, 1, DUSK_CONSOLE_POSIX_POLL_RATE);
|
||||
int32_t rc = poll(&pfd, 1, CONSOLE_POSIX_POLL_RATE);
|
||||
|
||||
if(rc == 0) continue;
|
||||
if(rc < 0) {
|
||||
|
@@ -9,12 +9,12 @@
|
||||
#include "consolevar.h"
|
||||
#include "consolecmd.h"
|
||||
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
#include "thread/thread.h"
|
||||
#include <poll.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define DUSK_CONSOLE_POSIX_POLL_RATE 75
|
||||
#define CONSOLE_POSIX_POLL_RATE 75
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
@@ -48,7 +48,7 @@ typedef struct {
|
||||
|
||||
bool_t visible;
|
||||
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
char_t inputBuffer[CONSOLE_LINE_MAX];
|
||||
thread_t thread;
|
||||
threadmutex_t execMutex;
|
||||
@@ -114,7 +114,7 @@ void consoleUpdate();
|
||||
*/
|
||||
void consoleDispose(void);
|
||||
|
||||
#if DUSK_CONSOLE_POSIX
|
||||
#if CONSOLE_POSIX
|
||||
/**
|
||||
* Input thread handler for posix input.
|
||||
*
|
||||
|
Reference in New Issue
Block a user