mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-30 14:08:21 +00:00
consoledev: fix deadlock
This commit is contained in:
@@ -18,7 +18,7 @@ static int outputlock;
|
||||
|
||||
void console_write(char* str, size_t count){
|
||||
|
||||
|
||||
|
||||
while(!spinlock_trytoacquire(&outputlock)){
|
||||
event_wait(&outputevent, false);
|
||||
}
|
||||
@@ -27,6 +27,8 @@ void console_write(char* str, size_t count){
|
||||
|
||||
spinlock_release(&outputlock);
|
||||
|
||||
event_signal(&outputevent, true);
|
||||
|
||||
}
|
||||
|
||||
#define THREAD_BUFF_MAX 2048
|
||||
|
||||
Reference in New Issue
Block a user