History log of /openbmc/obmc-console/test/test-ringbuffer-contained-read.c (Results 1 – 2 of 2)
Revision Date Author Comments
# b70f8713 18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix readability-isolate-declaration

For example:

```
/usr/bin/clang-tidy -checks=-*, readability-isolate-declaration -export-fixes /tmp/tmpoo7fbs72/tmpo8xiwfxs.yaml -p=build /mnt/host

obmc-console: Fix readability-isolate-declaration

For example:

```
/usr/bin/clang-tidy -checks=-*, readability-isolate-declaration -export-fixes /tmp/tmpoo7fbs72/tmpo8xiwfxs.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/test-client-escape.c
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:61:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *name, *value;
^~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:62:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *p, *line;
^~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:110:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
size_t size, len;
^~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:170:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct config_item *item, *next;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-client.c:263:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct console_client _client, *client;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia7829b1672ea2dfb3fa020c7c48bd8266e6a1769

show more ...


# c9775ce7 07-Feb-2017 Jeremy Kerr <jk@ozlabs.org>

server: Use ringbuffer for socket backlog

Currently, the socket handler uses a linear buffer for the backlog data;
this means we need to shift up to 128kB of data after each socket
w

server: Use ringbuffer for socket backlog

Currently, the socket handler uses a linear buffer for the backlog data;
this means we need to shift up to 128kB of data after each socket
write().

This change introduces a single-producer-multiple-consumer ringbuffer,
to avoid the need for memmove()ing data around; we can simply update
pointers instead of shifting data.

We add this as a new file (ringbuffer.c), to make it a little more
modular. To mitigate the risk of subtle pointer arithmetic issues, we
add a set of tests too.

Change-Id: Ib7c5151d3cf1f588436f5461000b6fed22d0681c
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

show more ...