| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | OS/2 programming tips ??? |
David Etheredge wrote in a message to Peter Fitzsimmons: DE> Thanks, I will look into that. The only concern that I have DE> here about using a device driver is that I hear that a DE> device driver can not access other device drivers. As a DE> routine, we log each individual character to disk as it DE> comes in / goes out the com port. This is critical for DE> debugging field problems. You can have device drivers access other devices. The requirement is that both device drivers have to be coded to allow it, using the Inter-Device Driver Communication (IDC) facility. If all you want to do is log stuff out of the driver to disk, that is quite a lot easier to do. One approach is to write the driver to allow a device monitor, and then write a device monitor daemon that runs at application level on the OS/2 scheduler. For more sophisticated functionality such as passing data back into the driver, you can write the device driver to expect an ancillary control process to communicate with it by IOCtl or similar mechanisms, and then write the ancillary control process to run as an application level daemon. You can use context hooks in the driver to make this a little more efficient. There are even tricks you can do to accomplish things that are technically unsupported. For example, you are not supposed to be able to do IDC to a block device driver, but you can write a single module that contains both a character and a block device driver which share identical code and data segments, and then you can do IDC with the character driver that has access to the block driver's private data. Believe me, logging is no big deal. If what you want is the ability to debug using dumps, then you should look at the native OS/2 system trace facility. This allows you to define logging events and checkpoints in your code that are recorded in a large ring buffer by the operating system. In the event of a crash, the trace buffer can be written out to disk. -- Mike ---* Origin: N1BEE BBS +1 401 944 8498 V.34/V.FC/V.32bis/HST16.8 (1:323/107) SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 323/107 150 3615/50 396/1 270/101 105/103 42 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.