Welcome, Guest. Please login or register.

Author Topic: Any tutorials/articles on OS-ports ?  (Read 3015 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Any tutorials/articles on OS-ports ?
« on: December 29, 2004, 05:32:37 PM »
@Einstein

How do you initialize the io request (diskio)? It must be initialized properly. Usually this is made with CreateMsgPort + CreateIORequest (cleanup with DeleteIORequest, DeleteMsgPort).

Also, from look of the code, I think you should use DoIO (-456) instead of SendIO (-462). SendIO is asyncron, so you'd need to WaitIO manually to sync. DoIO does this for you automagic.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Any tutorials/articles on OS-ports ?
« Reply #1 on: December 29, 2004, 06:02:21 PM »
Quote
pieces of code that handle the (event) messages one is waiting for, so ones program (task) may "sleep" and "wake up" when the port is called (in order to free the OS from the task that would otherwise do nothing but wait for the message).

I am on the right path ?

Well, basically.

Here's some code using input.device .. there I set up the msgport and iorequest structures manually (and the structure fields are commented, too). It's far from proper explanation of things, however.

Developer CD 2.1 (which includes RKRM manuals) has nice docs about stuff, at least.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: Any tutorials/articles on OS-ports ?
« Reply #2 on: December 29, 2004, 07:08:23 PM »
@Einstein

No. Use of includes makes the source code much more readable and easier to understand. The includes can be found from NDK3.9.lha.