diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-19 15:08:22 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-19 15:08:22 +0000 |
commit | 723087fa9463efa270a8581c8037e44fcc327766 (patch) | |
tree | 4fcd2790815d779bfc8ea8a38b276f940a85d33c /libgps.xml | |
parent | 715aabcbb2d082f80740d133761ab7862933021a (diff) | |
download | gpsd-723087fa9463efa270a8581c8037e44fcc327766.tar.gz |
Make a re-entrance-friendly version of gps_open().
The immediate use for this will be to simplify the code of gpsmon. All
regression tests pass and xgps runs sanely. Codebase splints clean.
Diffstat (limited to 'libgps.xml')
-rw-r--r-- | libgps.xml | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -28,6 +28,12 @@ C: <paramdef>char * <parameter>port</parameter></paramdef> </funcprototype> <funcprototype> +<funcdef>int <function>gps_open_r</function></funcdef> + <paramdef>char *<parameter>server</parameter></paramdef> + <paramdef>char * <parameter>port</parameter></paramdef> + <paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef> +</funcprototype> +<funcprototype> <funcdef>int <function>gps_query</function></funcdef> <paramdef>struct gps_data_t *<parameter>gpsdata</parameter></paramdef> <paramdef>char *<parameter>fmt</parameter>...</paramdef> @@ -122,6 +128,11 @@ attached to set depending on the error returned from the the socket layer; see <filename>gps.h</filename> for values and explanations.</para> +<para><function>gps_open_r()</function> is a reentrent-friendly +version That put the session storage where you wish to allocate it. +It returns 0 on success and -1 on failure, with errno set +appropriately.</para> + <para><function>gps_close()</function> ends the session. NB: ending the session does not destroy any threads created to handle callbacks. You must delete all callbacks prior to |