summaryrefslogtreecommitdiff
path: root/libgps.xml
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-09-19 15:08:22 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-09-19 15:08:22 +0000
commit723087fa9463efa270a8581c8037e44fcc327766 (patch)
tree4fcd2790815d779bfc8ea8a38b276f940a85d33c /libgps.xml
parent715aabcbb2d082f80740d133761ab7862933021a (diff)
downloadgpsd-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.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/libgps.xml b/libgps.xml
index 2afd7d6b..c59d258c 100644
--- a/libgps.xml
+++ b/libgps.xml
@@ -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