Multiple file access functions

The following group of functions should be the preferred method to access to the library. They allow to access to multiple ephemeris files at the same time, even by multiple threads.

When an error occurs, these functions execute error handlers according to the behavior defined by the function f90calceph_seterrorhandler().

Thread notes

If the standard I/O functions such as fread are not reentrant then the CALCEPH I/O functions using them will not be reentrant either.

It's safe for two threads to call the functions with the same handle of ephemeris object if and only if the function f90calceph_isthreadsafe() returns a non-zero value. A previous call to the function f90calceph_prefetch() is required for the function f90calceph_isthreadsafe() to return a non-zero value.

It's safe for two threads to access simultaneously to the same ephemeris file with two different objects. In this case, each thread must open the same file.

Usage

The following examples, that can be found in the directory examples of the library sources, show the typical usage of this group of functions.

The example in Fortran 77/90/95 language is f77multiple.f.

Functions