20
20
#include <thsemap.h>
21
21
#include <ioman.h>
22
22
#include <intrman.h>
23
- #include "intrman_add.h"
24
23
#include <sysclib.h>
25
24
#include <sysmem.h>
26
25
#include <thbase.h>
@@ -87,13 +86,13 @@ typedef struct _KprArg
87
86
int calls ;
88
87
} KprArg ;
89
88
90
- KprArg g_kprarg ;
89
+ static KprArg g_kprarg ;
91
90
92
91
#define KPR_BUFFER_SIZE 0x1000
93
- char kprbuffer [KPR_BUFFER_SIZE ];
92
+ static char kprbuffer [KPR_BUFFER_SIZE ];
94
93
95
94
96
- void PrntFunc (void * common , int chr )
95
+ static void PrntFunc (void * common , int chr )
97
96
{
98
97
KprArg * kpa = (KprArg * )common ;
99
98
@@ -122,12 +121,12 @@ void *Kprnt(void *common, const char *format, void *arg)
122
121
return 0 ;
123
122
}
124
123
125
- void * Kprintf_Handler (void * common , const char * format , void * arg )
124
+ static void * Kprintf_Handler (void * common , const char * format , va_list ap )
126
125
{
127
126
KprArg * kpa = (KprArg * )common ;
128
127
void * res ;
129
128
130
- res = intrman_14 ( Kprnt , kpa , ( void * ) format , arg );
129
+ res = ( void * ) CpuInvokeInKmode ( Kprnt , kpa , format , ap );
131
130
132
131
if (QueryIntrContext ())
133
132
iSetEventFlag (kpa -> eflag , 1 );
@@ -137,7 +136,7 @@ void *Kprintf_Handler(void *common, const char *format, void *arg)
137
136
return res ;
138
137
}
139
138
140
- void KPRTTY_Thread (void * args )
139
+ static void KPRTTY_Thread (void * args )
141
140
{
142
141
u32 flags ;
143
142
KprArg * kpa = (KprArg * )args ;
@@ -146,14 +145,13 @@ void KPRTTY_Thread(void *args)
146
145
WaitEventFlag (kpa -> eflag , 1 , WEF_AND | WEF_CLEAR , & flags );
147
146
148
147
if (kpa -> prpos ) {
149
- if (strncmp (kpa -> kpbuf , "WARNING: WaitSema KE_CAN_NOT_WAIT" , kpa -> prpos - 2 ))
150
- write (1 , kpa -> kpbuf , kpa -> prpos );
148
+ write (1 , kpa -> kpbuf , kpa -> prpos );
151
149
kpa -> prpos = 0 ;
152
150
}
153
151
}
154
152
}
155
153
156
- void kprtty_init (void )
154
+ static void kprtty_init (void )
157
155
{
158
156
iop_event_t efp ;
159
157
iop_thread_t thp ;
0 commit comments