Mono's io-layer

I have been closely following mono since a long time now and I have even had a chance to work on it. There is a lot one can learn by just looking at the mono code but something which I found useful while you are porting windows applications to Linux is mono's io-layer.

The mono developers used the Windows APIs like EnterCriticalSection(), InitializeCriticalSection() and so on and then implemented these functions and provided it as an IO abstraction layer. If you have a piece of code that was written for Windows and you need to port it to Linux, you can link it against mono io-layer and it works fine. I have done that for some of the code and it worked fine. There are certain APIs that mono has not implemented (They just implemented the ones which they were using, covers most of the basic stuff). So you might have to implement those and if you do, think of submitting the patch to the mono developers.

No comments: