Run-Time Libraries (GNAT User’s Guide for Native Platforms)

### 7.1 Run-Time Libraries ¶

The GNAT run-time implementation may vary with respect to both the underlying threads library and the exception-handling scheme. For threads support, the default run-time will bind to the thread package of the underlying operating system.

For exception handling, either or both of two models are supplied:

- ‘Zero-Cost Exceptions’ (“ZCX”), which uses binder-generated tables that are interrogated at run time to locate a handler.
- ‘setjmp / longjmp’ (‘SJLJ’), which uses dynamically-set data to establish the set of handlers

Most programs should experience a substantial speed improvement by being compiled with a ZCX run-time. This is especially true for tasking applications or applications with many exception handlers. Note however that the ZCX run-time does not support asynchronous abort of tasks (`abort` and `select-then-abort` constructs) and will instead implement abort by polling points in the runtime. You can also add additional polling points explicitly if needed in your application via `pragma Abort_Defer`.

This section summarizes which combinations of threads and exception support are supplied on various GNAT platforms.