• R/O
  • SSH
  • HTTPS

nos: 提交


Commit MetaInfo

修訂373 (tree)
時間2010-01-12 22:15:20
作者uchan_nos

Log Message

Messageクラスのデータメンバの変更
arg1, arg2, arg3をargとptrの2つにした。

Change Summary

差異

--- bitnos5/trunk/kernel/boot.cpp (revision 372)
+++ bitnos5/trunk/kernel/boot.cpp (revision 373)
@@ -255,8 +255,8 @@
255255 io_sti();
256256 msg = &queueMain.Front();
257257 if (msg->from == Message::From::Keyboard) {
258- //s[0] = ScanCodeUtils::ToAscii(msg->arg1);
259- s[0] = msg->arg1;
258+ //s[0] = ScanCodeUtils::ToAscii(msg->arg);
259+ s[0] = msg->arg;
260260
261261 //*
262262 if (s[0] != 0) {
@@ -284,7 +284,7 @@
284284 }
285285 //*/
286286 } else if (msg->from == Message::From::Timer) {
287- if (msg->arg1 == 1) {
287+ if (msg->arg == 1) {
288288 //tim1->SetTime(500);
289289 Task* consTask = taskman->Alloc();
290290 uintptr_t stackTop;
@@ -294,7 +294,7 @@
294294 TaskConsole::Init, DummyFunc, TaskConsole::Proc);
295295 consTask->InitQueue(128);
296296 taskman->Run(consTask, 1, 2);
297- } else if (msg->arg1 == 2) {
297+ } else if (msg->arg == 2) {
298298 //Debug::WriteLine("timCursor timeup");
299299 if (active) {
300300 timCursor->SetTime(50);
@@ -303,11 +303,11 @@
303303 }
304304 }
305305 } else if (msg->from == Message::From::System) {
306- if (msg->arg1 == Message::System::WindowActivated) {
306+ if (msg->arg == Message::System::WindowActivated) {
307307 mainWindow1.ShowCursor();
308308 active = true;
309309 timCursor->SetTime(50);
310- } else if (msg->arg1 == Message::System::WindowInactivated) {
310+ } else if (msg->arg == Message::System::WindowInactivated) {
311311 mainWindow1.ClearCursor();
312312 active = false;
313313 }
--- bitnos5/trunk/kernel/mouse.cpp (revision 372)
+++ bitnos5/trunk/kernel/mouse.cpp (revision 373)
@@ -248,7 +248,7 @@
248248 Valiables* o = (Valiables*)obj;
249249
250250 if (msg->from == Message::From::Mouse) {
251- if (Mouse::ReceivedData(msg->arg1)) {
251+ if (Mouse::ReceivedData(msg->arg)) {
252252 o->oldMouseData = o->mouseData;
253253 o->mouseData = *Mouse::GetData();
254254 //const Mouse::Data* mdata = Mouse::GetData();
--- bitnos5/trunk/kernel/keyboard.cpp (revision 372)
+++ bitnos5/trunk/kernel/keyboard.cpp (revision 373)
@@ -254,7 +254,7 @@
254254 for (int i = sizeof(o->rcv) - 1; i >= 1; i--) {
255255 o->rcv[i] = o->rcv[i - 1];
256256 }
257- o->rcv[0] = msg->arg1;
257+ o->rcv[0] = msg->arg;
258258
259259 o->sht->DrawRectangleFill(
260260 ConvRGB16(0xe0, 0xe0, 0xe0),
@@ -270,7 +270,7 @@
270270 if (msg->from == Message::From::Keyboard) {
271271 if (o->waitingByteCount > 0) {
272272 Command& cmd = o->commands->Front();
273- cmd.respondBytes[cmd.respondCount - o->waitingByteCount] = msg->arg1;
273+ cmd.respondBytes[cmd.respondCount - o->waitingByteCount] = msg->arg;
274274 o->waitingByteCount--;
275275 } else {
276276 if (o->rcv[0] == 0xfa) {
--- bitnos5/trunk/kernel/console.cpp (revision 372)
+++ bitnos5/trunk/kernel/console.cpp (revision 373)
@@ -256,8 +256,8 @@
256256 Valiables* o = (Valiables*)obj;
257257
258258 if (msg->from == Message::From::Keyboard) {
259- if (msg->arg1 != 0) {
260- if (msg->arg1 < 0x80) {
259+ if (msg->arg != 0) {
260+ if (msg->arg < 0x80) {
261261 EraseCursor(o);
262262 if (o->cons.rLine < o->cons.wPos.Y - o->cons.height) {
263263 o->cons.rLine = o->cons.wPos.Y - o->cons.height + 1;
@@ -271,22 +271,22 @@
271271 }
272272 ConsoleRefreshScreen(o, o->cons.rLine);
273273 }
274- PutChar(o, msg->arg1);
274+ PutChar(o, msg->arg);
275275 if (o->cursor) {
276276 ShowCursor(o);
277277 }
278- } else if (msg->arg1 == (uint32_t)ScanCode::Keys::KeyArrowUp) {
278+ } else if (msg->arg == (uint32_t)ScanCode::Keys::KeyArrowUp) {
279279 PrintHistoryUp(o);
280- } else if (msg->arg1 == (uint32_t)ScanCode::Keys::KeyArrowDown) {
280+ } else if (msg->arg == (uint32_t)ScanCode::Keys::KeyArrowDown) {
281281 PrintHistoryDown(o);
282- } else if (msg->arg1 == (uint32_t)ScanCode::Keys::KeyPageUp) {
282+ } else if (msg->arg == (uint32_t)ScanCode::Keys::KeyPageUp) {
283283 ScrollUp(o, o->cons.height - 2);
284- } else if (msg->arg1 == (uint32_t)ScanCode::Keys::KeyPageDown) {
284+ } else if (msg->arg == (uint32_t)ScanCode::Keys::KeyPageDown) {
285285 ScrollDown(o, o->cons.height - 2);
286286 }
287287 }
288288 } else if (msg->from == Message::From::Timer) {
289- if (msg->arg1 == TIMERDATA_CURSOR) {
289+ if (msg->arg == TIMERDATA_CURSOR) {
290290 if (o->active) {
291291 o->tim->SetTime(70);
292292 if (o->cursor) {
@@ -297,15 +297,15 @@
297297 o->cursor = true;
298298 }
299299 }
300- } else if (msg->arg1 == TIMERDATA_BEEP) {
300+ } else if (msg->arg == TIMERDATA_BEEP) {
301301 PIT::BeepOff();
302302 }
303303 } else if (msg->from == Message::From::System) {
304- if (msg->arg1 == Message::System::WindowActivated) {
304+ if (msg->arg == Message::System::WindowActivated) {
305305 o->active = true;
306306 o->tim->SetTime(20);
307307 ShowCursor(o);
308- } else if (msg->arg1 == Message::System::WindowInactivated) {
308+ } else if (msg->arg == Message::System::WindowInactivated) {
309309 o->active = false;
310310 EraseCursor(o);
311311 }
--- bitnos5/trunk/kernel/mtask.cpp (revision 372)
+++ bitnos5/trunk/kernel/mtask.cpp (revision 373)
@@ -337,11 +337,11 @@
337337 Valiables* o = (Valiables*)obj;
338338
339339 if (msg->from == Message::From::Timer) {
340- if (msg->arg1 == 1) {
340+ if (msg->arg == 1) {
341341 o->tim->SetTimePrev(100);
342342 }
343343 } else if (msg->from == Message::From::Keyboard) {
344- o->s[0] = msg->arg1;
344+ o->s[0] = msg->arg;
345345 if (o->s[0] == '\b') {
346346 if (o->inputXPos > 0) {
347347 o->inputXPos--;
--- bitnos5/trunk/kernel/message.cpp (revision 372)
+++ bitnos5/trunk/kernel/message.cpp (revision 373)
@@ -9,8 +9,8 @@
99
1010 Message::Message(
1111 uint32_t from,
12- uint32_t arg1, uint32_t arg2, uint32_t arg3) :
13- from(from), arg1(arg1), arg2(arg2), arg3(arg3)
12+ uint32_t arg, void *ptr) :
13+ from(from), arg(arg), ptr(ptr)
1414 {
1515 }
1616
--- bitnos5/trunk/include/bitnos/message.h (revision 372)
+++ bitnos5/trunk/include/bitnos/message.h (revision 373)
@@ -33,13 +33,12 @@
3333 uint32_t from;
3434
3535 // メッセージの内容
36- uint32_t arg1;
37- uint32_t arg2;
38- uint32_t arg3;
36+ uint32_t arg;
37+ void *ptr;
3938
4039 Message(
4140 uint32_t from = 0,
42- uint32_t arg1 = 0, uint32_t arg2 = 0, uint32_t arg3 = 0);
41+ uint32_t arg = 0, void *ptr = 0);
4342 };
4443
4544 #endif /* MESSAGE_H_ */
Show on old repository browser