Skip to content

Commit

Permalink
UDPTTY-ingame: removed intrman_add.h.
Browse files Browse the repository at this point in the history
  • Loading branch information
sp193 committed Feb 17, 2019
1 parent 4f6bd43 commit e346f7a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
2 changes: 1 addition & 1 deletion modules/debug/udptty-ingame/imports.lst
Expand Up @@ -52,6 +52,6 @@ loadcore_IMPORTS_end

intrman_IMPORTS_start
I_QueryIntrContext
I_intrman_14
I_CpuInvokeInKmode
intrman_IMPORTS_end

7 changes: 0 additions & 7 deletions modules/debug/udptty-ingame/intrman_add.h

This file was deleted.

1 change: 0 additions & 1 deletion modules/debug/udptty-ingame/irx_imports.h
Expand Up @@ -19,7 +19,6 @@
/* Please keep these in alphabetical order! */
#include "ioman.h"
#include "intrman.h"
#include "intrman_add.h"
#include "loadcore.h"
#include "smstcpip.h"
#include "stdio.h"
Expand Down
18 changes: 8 additions & 10 deletions modules/debug/udptty-ingame/udptty.c
Expand Up @@ -20,7 +20,6 @@
#include <thsemap.h>
#include <ioman.h>
#include <intrman.h>
#include "intrman_add.h"
#include <sysclib.h>
#include <sysmem.h>
#include <thbase.h>
Expand Down Expand Up @@ -87,13 +86,13 @@ typedef struct _KprArg
int calls;
} KprArg;

KprArg g_kprarg;
static KprArg g_kprarg;

#define KPR_BUFFER_SIZE 0x1000
char kprbuffer[KPR_BUFFER_SIZE];
static char kprbuffer[KPR_BUFFER_SIZE];


void PrntFunc(void *common, int chr)
static void PrntFunc(void *common, int chr)
{
KprArg *kpa = (KprArg *)common;

Expand Down Expand Up @@ -122,12 +121,12 @@ void *Kprnt(void *common, const char *format, void *arg)
return 0;
}

void *Kprintf_Handler(void *common, const char *format, void *arg)
static void *Kprintf_Handler(void *common, const char *format, va_list ap)
{
KprArg *kpa = (KprArg *)common;
void *res;

res = intrman_14(Kprnt, kpa, (void *)format, arg);
res = (void*)CpuInvokeInKmode(Kprnt, kpa, format, ap);

if (QueryIntrContext())
iSetEventFlag(kpa->eflag, 1);
Expand All @@ -137,7 +136,7 @@ void *Kprintf_Handler(void *common, const char *format, void *arg)
return res;
}

void KPRTTY_Thread(void *args)
static void KPRTTY_Thread(void *args)
{
u32 flags;
KprArg *kpa = (KprArg *)args;
Expand All @@ -146,14 +145,13 @@ void KPRTTY_Thread(void *args)
WaitEventFlag(kpa->eflag, 1, WEF_AND | WEF_CLEAR, &flags);

if (kpa->prpos) {
if (strncmp(kpa->kpbuf, "WARNING: WaitSema KE_CAN_NOT_WAIT", kpa->prpos - 2))
write(1, kpa->kpbuf, kpa->prpos);
write(1, kpa->kpbuf, kpa->prpos);
kpa->prpos = 0;
}
}
}

void kprtty_init(void)
static void kprtty_init(void)
{
iop_event_t efp;
iop_thread_t thp;
Expand Down

0 comments on commit e346f7a

Please sign in to comment.