zephyr/samples
Andrew Boie 10c41eea00 samples/logger-hook: fix usage of ring buffer
- Ring buffers provide no concurrency control. Since the ring buffer
is being installed as the system log hook, multiple contexts may try
to write to it simultaneously. Lock interrupts to prevent corruption
of the ring buffer.

- NULL pointers were being passed into sys_ring_buf_get() for the
'type' and 'value' parameters, causing undesirable behavior when they
are dereferenced.

- The 'size32' parameter of sys_ring_buf_put() was being passed the
number of bytes, not the number of 32-bit words.

- The 'size32' parameter of sys_ring_buf_get() was not bring correctly
initialized the size of the destination buffer in terms of 32-bit
words. This has been fixed. There is no longer a need to query the
API twice.

Issue: ZEP-1789
Change-Id: I96f9cc74f3711297727b4c5114b6c93510f4a8c1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-03-07 12:40:23 +00:00
..
basic samples: add some missing testcase.ini 2017-02-23 13:28:03 +00:00
bluetooth hci_usb: Add project configuration for tinyTile board. 2017-03-07 11:19:11 +00:00
drivers samples: i2c_fujitsu: change hard-coded device name 2017-02-28 13:49:48 +00:00
environmental_sensing
grove samples: grove: add missing testcase.ini 2017-03-06 16:58:31 +00:00
hello_world
ipm
legacy REVERTME: cpp_synchronization: disable on Xtensa 2017-02-13 11:39:03 -08:00
logger-hook samples/logger-hook: fix usage of ring buffer 2017-03-07 12:40:23 +00:00
net samples/net/mqtt: Don't break lines after the "static" keyword 2017-02-27 10:28:55 +02:00
nfc/nfc_hello
philosophers
power
sensor samples: bmi160: use correct device name 2017-02-11 01:28:09 +00:00
shell
static_lib
synchronization
testing lifo: Make use of k_queue as implementation 2017-02-27 21:20:53 +00:00
usb samples: webusb: fix variable type mismatches 2017-02-14 02:13:52 +00:00
advanced.rst
kernel.rst
samples.rst