gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gpsd patch


From: Gary E. Miller
Subject: Re: gpsd patch
Date: Tue, 7 Sep 2021 14:06:48 -0700

Yo Nick!


Some notes on your patch:

-------------

+extern bool __attribute__ ((weak)) gpsd_add_device(const char *device_name,
+                                                   bool flag_nowait);

gpsd is very portable,  ((week)) is ELF specific so naked gcc-isms are not 
allowed.

And yes, I see a similar mistake in drivers/driver_nmea2000.c:

extern bool __attribute__ ((weak)) gpsd_add_device(const char *device_name,

Why do you think you need that?

------------

+            if (gpsd_add_device != NULL) {

gpsd uses yoda condistionals, and note gpsd is not in C++, it does not
overload function names.

------------

This retries as fast as the CPU will allow.  Not good.  gpsd needs to be
kind to the CPU as it often runs on very low power devices.

+            if (gpsd_add_device != NULL) {
+                GPSD_LOG(LOG_INF, &session->context->errout,
+                     "retry TCP feed at %s, port %s.\n", host, port);
+                (void) gpsd_add_device(session->gpsdata.dev.path, false);

------------

Needs work.


RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgp9MIIw0ydFC.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]