commit | c9775ce74bbd1445c4d0ebb504f3f6ea20a6fa2e | [log] [tgz] |
---|---|---|
author | Jeremy Kerr <jk@ozlabs.org> | Tue Feb 07 16:25:34 2017 +0800 |
committer | Jeremy Kerr <jk@ozlabs.org> | Tue Jun 27 14:55:02 2017 +0800 |
tree | 13c1931684122480f2b2c1cc88f93b05948ac074 | |
parent | bc506fd262cdcebc6cdb0910a87cb7e4ccdd059d [diff] |
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>
Note: In addition to a toolchain and autoconf tools, this requires autotools-archive
to be installed.
To build this project, run the following shell commands:
./bootstrap.sh ./configure ${CONFIGURE_FLAGS} make
To fully clean the repository, run:
./bootstrap.sh clean
Running the server requires a serial port (e.g. /dev/ttyS0):
touch obmc-console.conf ./obmc-console-server --config obmc-console.conf ttyS0
To connect to the server, simply run the client:
./obmc-console-client
To disconnect the client, use the standard ~.
combination.