ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q: I am writing a QuickDraw GX printer driver that supports SCSI and Server connection types. I can connect multiple printers to one Mac on the SCSI bus, and I have seen that I can have active print jobs printing on all of them simultaneously. Do I have to be concerned about reentrancy when coding my message overrides? A: There are a few issues you'll need to keep in mind. One is that each copy of your driver must store any data it needs in its own
data space. You can do this by using the For each instance of your driver, you'll also need to watch out for insufficient memory. You shouldn't need to add much code if you are already checking for error conditions when attempting to allocate memory within your driver, but if there are places where you're not checking to make sure that the allocation was actually successful, you'll need to add code (it's a good idea to always check anyhow). You will also need to confirm that you don't have multiple instances of your
driver trying to write to the same DTP at the same time. There are any number
of ways you can implement this, including using a shared ( Additionally, if you are writing a PostScript driver, be aware that the PostScript font downloading code is not reentrant. In general, you should use these techniques to write any QuickDraw GX print driver, whether you expect it to need to worry about reentrancy or not. |
|