I have implemented exec SendIO() and Clock now successfully sends a timerequest to timer.device. But I have not come to the point that Clock waits for and gets a reply. It sends the request and continue with other stuff.
The new thing for the week is that Clock seems to copy the entire RastPort structure from the window into its own data area. That seems a little strange to me at this point, but I guess it has its reasons for doing this. I hope it’ll get clearer later on.
This copy procedure meant that all attributes in the RastPort structure had to be handled so it took some time to implement this. I realize that it will be a lots of work to implement all attributes in all kinds of structures, so it will probably be worth to automate this. Building a program that parses the header files from the NDK and create mapping skeletons for all structs setting up code for endian conversion as default for all attributes. This will save lots of manual work. I will consider this more when Clock is running. I hope there will not be many more copyings like this in the rest of Clock.