Domanda

What's the deal with the -gnatP (enable polling for asynch tasking operations) switch?

I'm working on a fairly large game project using GNAT, and the documentation claims that this switch is needed for Windows NT to allow various asynch tasking operations. Since my project uses quite a lot of tasking, I've been trying to determine if I actually need this switch or not.

What I can't determine is if "Windows NT" in this context refers specifically to Windows NT, or to NT-based systems. My searches on this topic have turned up blank.

This is concerning issue for me, since the inclusion of the polling code has a serious impact on the runtime performance of my project. Everything appears to work correctly without it, but I haven't had time to test extensively, and I'm still afraid that something I'm not aware of will bite me in the end.

So to sum up: Is -gnatP still needed for tasking on Windows systems? If so, is there a way that I can invoke the poller manually so that I can at least have some measure of control over it?

È stato utile?

Soluzione

AdaCore and GNAT make an overt effort to "do the right thing" with Ada on a particular platform.

My reading of the GNAT Pro User's Guide about -gnatP is that it's needed only if you need the ability in your program for "asynchronous abort and asynchronous transfer of control". An "asynchronous abort" I take to be an "abort task" statement, while "asynchonous transfer of control" is what it is.

If your program is not employing either of these features, then there is no need for -gnatP.

I've personally never used ATC, and used task abortion only until I figured out a better way to achieve what I was trying to do.

If your code is running fine without the switch so far, then I'm guessing that you're not using either of those features. And if you continue to avoid them, you should be fine.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top