Improve commentary a bit 20/292120/2
authorMichal Bloch <m.bloch@samsung.com>
Wed, 26 Apr 2023 15:05:02 +0000 (17:05 +0200)
committerMichal Bloch <m.bloch@samsung.com>
Tue, 11 Jul 2023 14:05:52 +0000 (16:05 +0200)
Change-Id: I91f26aae5fc34fe399ee948b8c8ca5630a5a654f
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
src/logger/reader_logger.c

index 1346625..fa9a2ed 100644 (file)
@@ -81,9 +81,6 @@ static int service_reader_logger(struct reader_common *_reader, struct now_t tim
        assert(reader);
 
        while (true) {
-               /* Note, nominally we had been polling the source FD entity and not
-                * `device_fd`, but that is the same FD (see the init and free ops).
-                * This is temporary redundancy due to the migration to threads. */
                int r = TEMP_FAILURE_RETRY(read(reader->device_fd, reader->read_buffer, sizeof reader->read_buffer - 1));
                if (r == 0)
                        break;
@@ -106,8 +103,8 @@ static struct reader_logger *reader_logger_alloc(struct logger *server)
        if (!ret)
                return NULL;
 
-       /* The reader has its own server struct
-        * that will be created later, in run(). */
+       /* The reader nominally belongs to the server,
+        * but is mostly handled by its own thread. */
        reader_common_init(&ret->common, server);
 
        ret->device_fd = -1;