• Home
  • History
  • Annotate
  • only in /system/chre/util/include/chre/util/
History log of /system/chre/util/include/chre/util/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b49310f0e24b38f4a6b023d87687baa28c441781 15-May-2018 Tajinder Gadh <tgadh@google.com> Merge "Add time constants" into pi-dev
287d33253bf07a4def9448eb3359b61973e9051a 15-May-2018 Tajinder Gadh <tgadh@google.com> Add time constants

Test: Build and run activity nano app

Bug: 71908697

Change-Id: Iaab2e158858af51eadee41f9983cbac1a8806b2e
ime.h
a26436339996e9c89bc8e221b069cfc2228b42ea 08-May-2018 Arthur Ishiguro <arthuri@google.com> Use container support for assert in UniquePtr

Bug: 79348239
Test: None
Change-Id: I760b1e78d07af8bdee0d089f669830f3722d8f99
nique_ptr_impl.h
a5a23b8a3649299278693967c1675eab84f8dab9 07-May-2018 Arthur Ishiguro <arthuri@google.com> Implements UniquePtr::reset

Bug: 79348239
Test: run_tests.sh, verify pass
Change-Id: I26e6039a0233557533cdfff101a32ec0d2637e12
nique_ptr.h
nique_ptr_impl.h
e0471ea19d5baa010881f04cf7bfb482c4b47807 26-Apr-2018 Andrew Rossignol <aarossig@google.com> Add safeGet() to Singleton<> and make get() simpler

- Removes a condition from get()
- This cuts code size slightly

Bug: 78638846
Test: ./load_chre.sh, see CHRE run
Change-Id: Ie71fd2328b1728103287f1cbb0ff5696a45ddbdf
ingleton.h
ingleton_impl.h
01d9125f7482882363b0e9e7653e455a919934d3 23-Apr-2018 Meng-hsuan Chung <menghsuan@google.com> Add a BreakIt test to SensorWorld nanoapp

Bug: 73070822
Test: run SensorWorld with BreakIt mode enabled.
Change-Id: I8a1c49d06a657b63f856b5e4b1c31ab9c154265f
anoapp/sensor.h
7501cd8b943795e66b78348805a1ceb85590ae28 27-Mar-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Removes support for static imu_cal" into pi-dev
b5e8d72d42b8f6864913a32e981d428993077e6b 23-Mar-2018 Brian Duddie <bduddie@google.com> Make ArrayQueueIterator satisfy ForwardIterator

Enables ArrayQueue to be used with std::copy, verified in a unit test.

Also add missing const declaration on operator== and !=.

Bug: 76168446
Test: ./run_tests.sh
Change-Id: I9bf8be2ca8f389383b59590a9f15d884de7d57d4
rray_queue.h
ade23f8966d924ed347ca6986781c39970167215 22-Mar-2018 Andrew Rossignol <aarossig@google.com> Removes support for static imu_cal

Bug: 74403573
Test: ./load_chre.sh, see IMU cal load dynamically
Change-Id: I1a05c025f74f68c61d939b3b15ae8d50aa83404e
anoapp/app_id.h
6fb38c62448a3ae1fc55379d5846e73a7648f538 20-Mar-2018 Andrew Rossignol <aarossig@google.com> Merge "Adds a math util header file for nanoapps to use" into pi-dev
6acb05565fdbe9a8c227e6635c055f12944334b1 20-Mar-2018 Andrew Rossignol <aarossig@google.com> Adds a math util header file for nanoapps to use

- Adds pi as the first constant, but will used for others to avoid
duplication.

Bug: 75978018
Test: Compile temporarily included in a nanoapp
Change-Id: I11ac28cb2f1fd92e78fbc43b2319145d3d1c5b74
anoapp/math.h
a7a83ccc5af22dd87d35ce737c38ac267d54005c 16-Mar-2018 Arthur Ishiguro <arthuri@google.com> Allow move semantics in FixedSizeBlockingQueue

Bug: 74559032
Test: run_tests.sh and verify pass
Change-Id: Ic4e9504715be4138a0076a2b32b7117905f6b79a
ixed_size_blocking_queue.h
ixed_size_blocking_queue_impl.h
742d1da96b54b55cbd33c7a57273389149e9179b 02-Mar-2018 Andrew Rossignol <aarossig@google.com> Fixes the standalone AudioWorld build

- Small tweaks to include paths and symbol names

Bug: 67001170
Test: make google_x86_linux for AudioWorld
Change-Id: I84af2bf8a76711ec76be54fec06f38752ecca957
anoapp/audio.h
ea88b297eb1a7f3ab48a5e84eb097583460a00f7 23-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add getMilliseconds() to Microseconds"
47f3b5ab767b77f42f66ae7be3a9d5f6a82340a9 21-Feb-2018 Meng-hsuan Chung <menghsuan@google.com> Add getMilliseconds() to Microseconds

Test: ./run_tests.sh
Change-Id: I41f604619c18f6a8cb264749dfbc7f1ae2e6493c
ime.h
ime_impl.h
275b71ba250f785fad0e20b63b9fbff091846189 21-Feb-2018 Andrew Rossignol <aarossig@google.com> Adds missing cstddef to array_queue.h for size_t

Test: ./run_tests.sh
Change-Id: I57f5648f7a8825e0c3a00441adf682073f3a601c
rray_queue.h
ef06a3d8e6bd89d32fe190dc72af8d270745b6e5 20-Feb-2018 Andrew Rossignol <aarossig@google.com> Adds CHRE_ASSERT for nanoapps to use

- It was previously hidden in container support, but it is useful
beyond the scope of just supporting containers.
- Also addes a LOGE prior to chreAbort to capture file/line info.

Test: make google_x86_linux for timer_world, ./run_sim.sh, ./run_tests.sh
Change-Id: I204e26ed768f26aa75577ed383d2c27b51fd3b67
ontainer_support.h
anoapp/assert.h
0033a354c2d8650a3b12a73f4b4f97791c36daa2 16-Feb-2018 Andrew Rossignol <aarossig@google.com> Removes CHRE_ASSERT_LOG from container_support.h

- It is no longer used as the containers no longer use it.

Test: ./run_tests.sh, ./run_sim.sh
Change-Id: Icab5032db9b3ce24811497ae01d73a05d392eb05
ontainer_support.h
69e16310899fb3a1a5169cb955e5eed3277bea7c 09-Feb-2018 Brian Duddie <bduddie@google.com> Update NSL for backwards compatibility from v1.2

Allow nanoapps using the DSO Nanoapp Support Library to reference
symbols defined in API v1.2, but still run on CHRE implementations that
only support v1.1.

Test: build a nanoapp that references new v1.2 APIs and confirm it loads
and runs on walleye running Android O (v1.1 platform)
Change-Id: I344073275f69ffc15be16a49b993a2067a8c1804
acros.h
21b4a6069eaad94f610a4debfbd21c8a8ec06a38 01-Feb-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Creates a "Host Awake World" nanoapp"
2301c93ed1f430baeb841aab5c14fa65ca6e18cc 27-Jan-2018 Arthur Ishiguro <arthuri@google.com> Creates a "Host Awake World" nanoapp

Sends a message to the host periodically if it is awake.

Bug: 69976723
Test: load_chre.sh and verify nanoapp runs
Change-Id: I471b57040325b6a635dc2e7948ddaaa92c645fc0
anoapp/app_id.h
40e4c30b3cd5d30a015a67e596e88ca71103064f 31-Jan-2018 Andrew Rossignol <aarossig@google.com> Makes ArrayQueue compatible with nanoapp usage

Test: ./run_tests, ./run_sim.sh, \
make google_x86_linux for TimerWorld with ArrayQueue included

Change-Id: Ibaa57bf6aedffd7c4a04a8a2d1f62e1921c648e3
rray_queue_impl.h
c735f9bd431366dfdaffac749ee2f53f9ece2079 18-Jan-2018 Andrew Rossignol <aarossig@google.com> Merge "Adds a resize() method to DynamicVector"
94928e4afa74f1ce137a7ccc243a6fb74d59abc3 18-Jan-2018 Andrew Rossignol <aarossig@google.com> Adds a resize() method to DynamicVector

Bug: 70682086
Test: ./run_tests.sh, ./run_sim.sh
Change-Id: Ic5012effbe899fc2a9af84091d9fb3f8eb1b4dc6
ynamic_vector.h
ynamic_vector_impl.h
812101357014f2e159a4e50b33e5285975a8faa5 18-Jan-2018 Brian Duddie <bduddie@google.com> Include CHRE API dependency in nanoapp log util

Ensures chreLog and its enum are defined prior to their use.

Test: compile only
Change-Id: Ia53e28cd6c7a15b2632f914e9d97e04e7db472e0
anoapp/log.h
b3edbb8998aafbc5424a880a273e7694b3691b4f 17-Jan-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Ensure CHRE util headers can be used independently"
37f8ef3069cfd12ced355a99c372f97cb9cf1363 17-Jan-2018 Andrew Rossignol <aarossig@google.com> Ensure CHRE util headers can be used independently

- Add missing includes
- Avoid use of LOG

Bug: 70682086
Test: ./run_tests.sh, ./run_sim.sh
Change-Id: I6139573c23c230abeb86e3fff9fcb59dbedcb9e3
ynamic_vector_impl.h
emory.h
nique_ptr.h
nique_ptr_impl.h
58654cccadf5ccc7a1822367de2811e13dc47437 17-Jan-2018 Enxun Wei <enxun@google.com> Add a missing include so that the file can be built in google3.

Test: manual build.
Change-Id: If5383bbb8cf6f24023625bfe94e3379d13ba1a0d
ingleton_impl.h
13fe8d0c9945a1948e29285bc08969e691653e6a 12-Jan-2018 Kevin Chyn <kchyn@google.com> Merge "Add ARRAY_END macro to CHRE utils"
a0406825a3a29abf2dc49c39e14438fe1fc74a9f 12-Jan-2018 Kevin Chyn <kchyn@google.com> Add ARRAY_END macro to CHRE utils

Test: manual
Change-Id: I611f283a07f62141a3522efd3d0662930f833440
acros.h
51ab3fb01cd880d7f3285feb1e4eb68d164838f6 09-Jan-2018 Kevin Chyn <kchyn@google.com> Add a move assignment operator to DynamicVector

Test: ./run_tests.sh --gtest_filter=DynamicVector.*

Change-Id: I023b8db5cb33fd0baa74b7e9e5b7f1d72fd24c0e
ynamic_vector.h
ynamic_vector_impl.h
a6701763f8609b9aeb7752c1b526122b2023ddad 27-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I8366096c,I79016711,If7acafe3

* changes:
Removes some duplicate CHRE_ASSERT conditions from DynamicVector
Removes the HostSleepEventManager now that it maintains no state
Adds a high watermark to the event pool and consolidates fatal errors
67a8f0c9e984d956bafe212f35cec39f51f80dcc 27-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I44592f7f,Id2edd1c7

* changes:
Adds getFreeBlockCount to MemoryPool and test
Move the chreIsHostAwake storage to the platform
1e31bd927caf1489d2c22aecea747b94c9bcedf4 27-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Enable -Wdouble-promotion, except in logging"
6419236c5e00fa9114557275d8062798d306ea90 22-Nov-2017 Andrew Rossignol <aarossig@google.com> Removes some duplicate CHRE_ASSERT conditions from DynamicVector

Test: ./run_sim.sh, ./load_chre.sh, ./run_tests.sh
Change-Id: I8366096cdf10a6c89239de1f95f9ea28e623e9f1
ynamic_vector_impl.h
ce3fdf510d062b3a623005305fc0105c070747ee 22-Nov-2017 Andrew Rossignol <aarossig@google.com> Adds getFreeBlockCount to MemoryPool and test

Test: make clean && ./run_tests.sh
Change-Id: I44592f7f0f872f442b5f80772579d48ae1c81ae6
emory_pool.h
emory_pool_impl.h
ynchronized_memory_pool.h
ynchronized_memory_pool_impl.h
f223326c02fc351d41d4a6a41a83d80e28cbb1aa 21-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Factor out logic that converts QTimer ticks to nanoseconds"
baa4939bfc9092bd9b0a93763a3641f115a59f21 21-Nov-2017 Brian Duddie <bduddie@google.com> Enable -Wdouble-promotion, except in logging

Configure the compiler to error on likely unintentional promotion from
float to double. Also, fix some instances of this in the codebase.

Test: ./run_sim.sh, ./load_chre.sh for 2017 and 2018 devices
Change-Id: I1ec89514f07c7ae525336030d07b8e5eba4b106a
og_common.h
anoapp/log.h
oolchain.h
61c5c1b001573d91012fd18e670e262b414aa81b 21-Nov-2017 Brian Duddie <bduddie@google.com> Enable -Wformat for nanoapps

Add printf format declaration to chreLog when the nanoapp logging
utility header file is included, so format string errors will be caught
at compile time.

Test: ./run_sim.sh, ./load_chre.sh, make nanoapps
Change-Id: Id6cc0585f5b15ff0d92ed87c5df71fb214ae22c1
og_common.h
anoapp/log.h
da0fd50de0eb302a5e488466312f89bfa3d8c477 20-Nov-2017 Meng-hsuan Chung <menghsuan@google.com> Factor out logic that converts QTimer ticks to nanoseconds

Test: ./load_chre.sh
Change-Id: Ie4c8d4797c67a2ecbb805c1d14b28f12507fb6c2
ime.h
bbc873fab78968640772e6c476e689024c0761ce 20-Nov-2017 Brian Duddie <bduddie@google.com> Add ArrayQueue::back() with tests

Test: ./run_tests.sh
Change-Id: Ibdac155a64d2afd412d8872c0d80d094c7f3a490
rray_queue.h
rray_queue_impl.h
41f929c661d6a7adcf4c939d93d2f5437f144a2b 15-Nov-2017 Brian Duddie <bduddie@google.com> Enable compiling WiFi World as a dynamic nanoapp

Test: build as dynamic and load on simulator
Change-Id: I6b7081769cfcdce4618424410bbb55dfd712d368
anoapp/wifi.h
b1f0f1b2169614ad99da53d10bd8d26e6795827d 11-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds retry to SEE sensor discovery."
86757b10c208564c37c333926e3ffba08c273771 10-Nov-2017 Meng-hsuan Chung <menghsuan@google.com> Adds retry to SEE sensor discovery.

Bug: 69066253
Test: ./load_chre.sh and verify that sensors are enumerated.
Change-Id: I81f6a6a8ee5e652f375aa74fa2b387717fa3b29e
ime.h
ime_impl.h
6c36566579fbbf1826caaf63f6fd60a3657b45f5 10-Nov-2017 Andrew Rossignol <aarossig@google.com> Use container_support for FixedSizeVector

Test: ./run_sim.sh, make google_arm64_android for TimerWorld
Change-Id: I9fecce53bec8f31e41b28d2a6a73d3804684b140
ixed_size_vector_impl.h
e926ddebba4b48f28e8be7a361692071eb26c7db 13-Oct-2017 Andrew Rossignol <aarossig@google.com> Adds a less than or equal to comparison for nanoseconds

Bug: 67001170
Test: ./run_sim.sh, ./run_tests.sh
Change-Id: I427a3dd08c929c521300d54900e622fa24a5b22b
ime.h
ime_impl.h
9661bd5953f2668d89de40e376a939f1f345af11 03-Oct-2017 Andrew Rossignol <aarossig@google.com> Exercise chreAudioGetSource from AudioWorld

Bug: 67001170
Test: ./run_sim.sh, ./load_chre.sh, basic sanity checks
Change-Id: I4023f9cdd437b5f7bb1520b2c60bb57ef37e0fa8
anoapp/audio.h
f43dfa6d0b0b4005ee2643f8a1e898b7dde78cc3 26-Sep-2017 Andrew Rossignol <aarossig@google.com> Adds an AudioWorld nanoapp

- Mostly empty for now, will be used to exercise audio functionlity
while developing.

Bug: 63942658
Test: ./run_sim.sh, see AudioWorld in the output
Change-Id: Id0031a06cd65650e4aa8ba6fd9b56921c1c47fdf
anoapp/app_id.h
b88bf455dbdf6555d7c5ae3abf0ae98d215c88b2 26-Sep-2017 Andrew Rossignol <aarossig@google.com> Corrects the macro used to determine when logs should be included

Test: make google_x86_linux for a sample nanoapp and load it
Change-Id: I3df286e61a88ce42f3c114db24db8b0ee5e1d3ac
anoapp/log.h
8a6e33be3c2c1faa1b2b1cedb1df46342884c3ab 14-Sep-2017 Andrew Rossignol <aarossig@google.com> Adds remove() and the subscript operator to FixedSizeBlockingQueue

These just pass through to the underlying ArrayQueue

Test: ./run_sim.sh, ./run_tests.sh
Change-Id: Ie8e1a9ec7e135082cecc6a8984f64e126ab8e9cc
ixed_size_blocking_queue.h
ixed_size_blocking_queue_impl.h
c4e08b3233ca5f0bd18f7c9390773d2333d25379 30-Aug-2017 Andrew Rossignol <aarossig@google.com> Merge "Adds a conversion constructor to UniquePtr" into oc-mr1-dev am: 6966f60eba
am: 005ab2ea02

Change-Id: I65575a28859444cf7d1f1a91152cff0896a29357
b0a49191b9ba492ed279c0e981b4354ba41b850f 30-Aug-2017 Andrew Rossignol <aarossig@google.com> Merge "Makes UniquePtr, DynamicVector and FlatBuffers portable" into oc-mr1-dev am: c36d9ab8ac
am: 26d0c5d693

Change-Id: I1ac5b73535c5776fe26487ef4ded1f0be1a9d53b
c67f6f671f586d57f5c836fadc163ad562c75c55 30-Aug-2017 Andrew Rossignol <aarossig@google.com> Adds a conversion constructor to UniquePtr

Bug: 65119819
Test: ./run_sim.sh, ./load_chre.sh
Change-Id: I29413953c39ddea43625cd56f651477f1a16ddd3
nique_ptr.h
nique_ptr_impl.h
97156830527953070044eed8b0eb42ba689c53c4 28-Aug-2017 Andrew Rossignol <aarossig@google.com> Makes UniquePtr, DynamicVector and FlatBuffers portable

- They are now usable when compiled as part of an external nanoapp.

Bug: 62868460
Bug: 65119819
Test: ./load_chre.sh and basic CHRE sanity check
Change-Id: I1c6f9047bae0b9fdd2d99062b29784da8fd256eb
ontainer_support.h
ynamic_vector_impl.h
emory.h
emory_impl.h
nique_ptr_impl.h
ccf43a3a6059b05ffb9ee149349ad29a7b31b376 25-Aug-2017 Brian Duddie <bduddie@google.com> Merge changes I4f533108,Ifd38fac4 into oc-mr1-dev am: 7d20c6018d
am: 89d6ef7383

Change-Id: Id48db21b42bad79605d2ce428fb9bd6dbad624c8
792a98a5f7225d28dfb3963b89d48504b554f838 24-Aug-2017 Brian Duddie <bduddie@google.com> Add MakeUniqueZeroFill helper for UniquePtr + test

Bug: 63601406
Test: ./run_test.sh, all tests pass
Change-Id: Ifd38fac4b77c93c8067d0a7acd2699d901b49915
nique_ptr.h
nique_ptr_impl.h
4752aa95c501ef3b585cdfec4d5d814bd42b10aa 18-Aug-2017 Arthur Ishiguro <arthuri@google.com> Initial framework for uimg transition for CHRE am: ff1c1a2ab3
am: 1cc31f3d22

Change-Id: Ifc15b2f701f9641a16fc615e4c0c10a0720dce5b
ff1c1a2ab3ff2614bb6cea1f1d6f6e9c44a87464 05-Aug-2017 Arthur Ishiguro <arthuri@google.com> Initial framework for uimg transition for CHRE

- Creates a "power control manager" class for platform-specific power
related routines
- Creates a platform PAL base class, to be used as a central location to
perform platform specific routines related to CHRE interactions with the PAL
- For the SLPI, the following will occur:
1) We vote for big image for any event handling entry points for big image
nanoapps, and before calling a PAL API.
2) Whenever the system is idle (event loop has no pending events), we
remove our previous big image vote.
- Creates a size() function for fixed size blocking queue

Bug: 63601406
Test: Compile and run CHRE

Change-Id: I960dc883ec90d676ee638a70912e9353d470d039
ixed_size_blocking_queue.h
ixed_size_blocking_queue_impl.h
a71f6c1e1e517f9090c92ac894e52f170a1969d3 09-Aug-2017 Andrew Rossignol <aarossig@google.com> Adds pop_back() to ArrayQueue and tests

Test: ./run_tests.sh, all tests passing
Change-Id: Icb80fbef77ab65f6a8169fdcc57fc4bf1955f219
rray_queue.h
rray_queue_impl.h
9a99acb25a641bc9908e35c14aba1423b3af76ba 01-Jul-2017 Brian Duddie <bduddie@google.com> Change IMU Calibration app ID

Use Google's vendor ID + app ID 0x16 instead of the sample app vendor
ID.

Fixes: 63178103
Test: compile only
Change-Id: If13831ef8ab15565724a1f01c09c7565b43f62ab
anoapp/app_id.h
d0530f420d8bdaee755ec2834af407424de195e0 16-Jun-2017 Arthur Ishiguro <arthuri@google.com> Logs CHRE state in debug dump

For starters printing the heap alloc stats, list of loaded nanoapps, and
registered sensors.

Bug: 62659408
Test: Collect bug report, verify log shows up in lshal-debug.txt
Change-Id: I614fd7c708adacab24e00483562bbd24bb13cbc6
ystem/debug_dump.h
7e0b18cd2fd2f6f994b57659873113d0f140c124 26-May-2017 Meng-hsuan Chung <menghsuan@google.com> Adds AshWorld nanoapp to test ASH API

Test: compile and run
Change-Id: If79918222211743319b18d9b00674d039f07c16c
anoapp/app_id.h
39d874441f068012800611e0cb5465b9b24c47b7 20-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Adds a destructor to FixedSizeVector"
a2dbd6ba8253d227db1c90493f633bd52117dc6b 20-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Switch to use aligned storage for MemoryPool"
4849d809e7b9691e5968923d546c8be7547e4386 19-May-2017 Meng-hsuan Chung <menghsuan@google.com> Adds a destructor to FixedSizeVector

Test: run_tests.sh and run_sim.sh

Bug: 38419926
Change-Id: Id1f74a3f1dd4c5d99c051f3ea27014c5b704e767
ixed_size_vector.h
ixed_size_vector_impl.h
a51ef01822ac68061a1d6e686389cfbcb0e1f8da 19-May-2017 Meng-hsuan Chung <menghsuan@google.com> Switch to use aligned storage for MemoryPool

Test: run_tests.sh and run_sim.sh

Change-Id: I120982232bf9d096bf419385ee5a791434d6a55b
emory_pool.h
emory_pool_impl.h
ec1720a0d73e703794430f8b0b1ffe3bb4763bb3 18-May-2017 Andrew Rossignol <aarossig@google.com> Adds a logBuffer to util

- Not intended for production usage, but handy for debugging issues
interactively.

Test: Dump a buffer.
Change-Id: I790c4af97f023d863de862c90df4e6d10812fffc
anoapp/debug.h
9695b7bc89781c40aeb545ac0e879ff063590bf0 11-May-2017 Andrew Rossignol <aarossig@google.com> Compile CHRE with hidden visibility

- Export the API with a new DLL_EXPORT macro
- Prevents external code from calling into CHRE

Test: load_chre.sh, see activity.so load + run
Change-Id: Ic57fc7e15e115f394cb14e0a4f5729c25c21a1cf
acros.h
1180c410c55a0b6a130667ab6c59c406fe42a9ce 02-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "[Nanoseconds] Adds tests to verify overflow in +/- operations"
b2ddcf26fc919cb8024ab0536db8362bcb77dfd5 28-Apr-2017 Meng-hsuan Chung <menghsuan@google.com> [Nanoseconds] Adds tests to verify overflow in +/- operations

Change-Id: I036828e5996d2aed984eda7847e6f2d282dbf62d
ime.h
ime_impl.h
55e0aaa6540f86549b2b95c6b06208466921ee23 28-Apr-2017 Andrew Rossignol <aarossig@google.com> Adds a ScopeTimer to util

- Measures the lifespan of an object called ScopeTimer and logs the
duration in the destructor.
- Useful for manual benchmarking.

Test: Add a ScopeTimer to event loop and run the simulator
Change-Id: I6b4fe0b0672ca504627a5602f6ca07f21dfaa708
cope_timer.h
cope_timer_impl.h
f3ea231ca3ca6a526316c75e9a3df033dcf1ee07 19-Apr-2017 Mehdi Alizadeh <mett@google.com> Overloads operator== for DynamicVector

To increase similarity to std::vector's interface.

Test: run unit tests, simulator
Change-Id: I78e491472dad17c47f0d79b66178e713e4076840
ynamic_vector.h
ynamic_vector_impl.h
df85b4c9c0a215f67684db3e6bf2d1996ee811d4 18-Apr-2017 Arthur Ishiguro <arthuri@google.com> Add unit tests for time duration classes in util

Test: run_tests.sh
Change-Id: Ibf53391ed4f3ea1d47e76923ecdcbb772bd09805
ime.h
ime_impl.h
39ec3db30b1c10e065e83cc621456fca48b495d3 17-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I43828975,Ie07b8722

* changes:
Updates the include path for time_impl.h
Updates path to x86 toolchain
fde6592312974ea7405bcec9f501eb8c05133bab 17-Apr-2017 Arthur Ishiguro <arthuri@google.com> Updates the include path for time_impl.h

Test: run_tests.sh and run_sim.sh
Change-Id: I438289758e49a8634ea74cfd2c6c62f70bc0099c
ime.h
2d7d24a7bb72c9c3b4ff1af5f7fef8b303fd8c0e 17-Apr-2017 Brian Duddie <bduddie@google.com> Updates to Optional for safety and consistency

After the destructor is invoked via Optional::reset(), the underlying
object is invalid and cannot be safely used for assignment. Avoid this
by performing move/copy construction in the Optional assignment
implementations if the underlying storage is uninitialized.

Also, bring chre::Optional in-line with std::optional by removing the
requirement for the contained object to have a default constructor
(instead leaving the object storage uninitialized after default
construction of Optional), and making the semantics of move assignment
the same (only the underlying object is moved, not the "ownership" of
the object, i.e. the moved-from Optional can still have has_value() set
to true).

Test: ./run_tests.sh
Change-Id: Ie3627838aee10acf89d3cf609aebf8fc6694ebea
ptional.h
ptional_impl.h
dc94298b510b26eedbe1e8744b92f7c0b41a6006 14-Apr-2017 David Jacobs <davejacobs@google.com> Update to 'chreLogNull'

This change was required because commenting out parameter name is
not valid C.

Change-Id: Ie6049feb68a3d011c987dbf1e18f7032bcc6f758
og_common.h
f1694b5b8abc93de4e187a78c096977ad6cf4b56 07-Apr-2017 Brian Duddie <bduddie@google.com> Add ConditionalLockGuard, update EventLoop to use it

Test: run unit tests and simulator
Change-Id: Ia031c9f8afb65b3e14c19ca8a8ada46723219393
onditional_lock_guard.h
onditional_lock_guard_impl.h
b2466e41846b76b11b09788e1c1ff49632237a90 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Ib6dbe26b,Ia08c04d9

* changes:
Add support for unloading nanoapps
Add test nanoapp that spams events and messages
7c311cb87caba54c11894d72a1a75f0cab365ce9 07-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes Iee7d7513,Ieb54531e

* changes:
Enables -Wconversion for the simulator and fixes some warnings
Releases the WifiScanRequest async result on event posting failure
99f01ac9bd6e351538cb8922ef15d9e838e7339a 06-Apr-2017 Brian Duddie <bduddie@google.com> Add support for unloading nanoapps

Add the capability for clients on the host to dynamically request the
unloading of a nanoapp. This initial implementation takes measures to
avoid potentially referencing the memory in the nanoapp after it is
unloaded, by flushing events and messages, but does not clean up after
the nanoapp if it leaves a sensor request open, or a timer running, or
doesn't free all of its dynamic memory, etc. As part of ensuring this
safety, CHRE will now prevent a nanoapp that is being unloaded from
sending events or messages just prior to invoking the nanoappEnd
callback.

Add an unload tester nanoapp that unloads the spammer test nanoapp after
a short delay, to help verify that event and message cleanup is handled
appropriately.

Test: run unload tester nanoapp in simulator and on SLPI, use
chre_test_client on SLPI to unload AR
Change-Id: Ib6dbe26b6414e417401412375390ceef5663d4d9
anoapp/app_id.h
3d2336c8674fff457469e0749ab64f220eaa38ff 06-Apr-2017 Brian Duddie <bduddie@google.com> Add test nanoapp that spams events and messages

To be used in app unload testing, etc.

Test: run simulator
Change-Id: Ia08c04d94abe2923d04a85b63c24f8b904496a45
anoapp/app_id.h
7e3b2f719dfcff6fc0a394bafe6506981a2a2e17 05-Apr-2017 Andrew Rossignol <aarossig@google.com> Enables -Wconversion for the simulator and fixes some warnings

Test: Run the sim, tests and load_chre.sh.
Change-Id: Iee7d7513b91a92e7daea108346ab5881e3f55a14
anoapp/sensor.h
7831da5d5b053b1be69925e60d16030ec4c462dc 06-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expose size_type in DynamicVector"
2350c21b0d519b112c903494ba3fb63d04f49aae 05-Apr-2017 Brian Duddie <bduddie@google.com> Add DynamicVector::pop_back()

Test: run unit tests
Change-Id: Iaf176380a84de839d76858f39da772da7a05c79a
ynamic_vector.h
ynamic_vector_impl.h
cf24c0e050002fd3331ad4498f97f3842ec532aa 05-Apr-2017 Brian Duddie <bduddie@google.com> Expose size_type in DynamicVector

To increase similarity to std::vector's interface.

Test: run unit tests, simulator
Change-Id: Id43f6e026c8c5c7629e046477541c60fdc54f1fd
ynamic_vector.h
ynamic_vector_impl.h
090c2796acebb647a98c48a007c7b2bb151f1e50 04-Apr-2017 Brian Duddie <bduddie@google.com> Add front() and back() methods to FixedSizeVector

Test: compile
Change-Id: Iaf9439a0d5e66869194d57659e41bad01d2cf71a
ixed_size_vector.h
ixed_size_vector_impl.h
d2e14b12152f4caaf9e6d9b6fbc6152588b509d9 01-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes I01867267,I3d1ed01c

* changes:
Supplies stubs for GNSS location start/stop session APIs
Adds a GnssRequest class compliant with the RequestMultiplexer
c1893d235b674f8a859a9e53aad406b5100c725d 31-Mar-2017 Andrew Rossignol <aarossig@google.com> Supplies stubs for GNSS location start/stop session APIs

Test: Run the simulator
Change-Id: I018672675e3244b7b253e669c51f8eb6978cbbd2
ime.h
ime_impl.h
5104fb101aaea4793daa061b160fbc3feb051b0d 31-Mar-2017 Andrew Rossignol <aarossig@google.com> Adds a GnssRequest class compliant with the RequestMultiplexer

Test: Run simulator and tests.
Change-Id: I3d1ed01c492e4c37d320138de2c02f7c5798750f
ptional_impl.h
ime.h
ime_impl.h
56944d8c8698b3304ddc52dd257ec8da30dcb189 30-Mar-2017 Brian Duddie <bduddie@google.com> Reduce debugging output from CHRE daemon

Test: load, confirm verbose binary buffer dumps are not printed
Change-Id: I2974690a608cd66cc37fcb9e2990ec3063e74c69
og_common.h
1a16de2440b92ac60a94029589a20f92011b6841 27-Mar-2017 Brian Duddie <bduddie@google.com> Make vector swap() a no-op when the same index is given twice

Add a check to the swap() methods in FixedSizeVector and DynamicVector
to skip attempting to swap the values when the passed-in indices to swap
are the same.

Test: run simulator with valgrind
Change-Id: I0e24a5e2b3d78ffdd1fa82ab2ba28e1240cc24a0
ynamic_vector_impl.h
ixed_size_vector_impl.h
8be5eabe6a4fc60c56a3b32794bb6677e26f6eab 27-Mar-2017 Brian Duddie <bduddie@google.com> Fix incorrect usage of assignment, move in containers

Containers like DynamicVector were using the assignment operator in
multiple places to initialize memory. This is not valid, as assignment
assumes that the receiving object has already been constructed. This
manifested in use of DynamicVector<UniquePtr>, where UniquePtr's move
assignment operator would call memoryFree on its pointer if not null -
if its pointer was some non-zero uninitialized memory, this would lead
to memory corruption and a likely crash.

Resolve this issue by correcting all instances where assignment was used
on uninitialized memory to use placement new to properly construct these
objects. Also, make updates to places where containers assumed that
move/copy assignment/construction was supported by the contained type to
check that condition and select the appropriate option.

Finally, fix the tests that were written with the assumption that
certain operations would use assignment when they should have used
construction, and also increase overall test coverage to ensure this
issue does not recur.

Test: run tests and simulator with valgrind
Change-Id: Ia2803ab78a02065acab384e536c3259a52f7c863
rray_queue.h
rray_queue_impl.h
ynamic_vector.h
ynamic_vector_impl.h
ixed_size_vector_impl.h
emory.h
emory_impl.h
30b9ff24de129660ccc6ee7a4cc585222be96e9f 27-Mar-2017 Brian Duddie <bduddie@google.com> Move unique pointer construction to free function

Including a forwarding constructor in UniquePtr prevents creation of a
move constructor, which is necessary to resolve an issue in the
containers. Instead, use a new free function called MakeUnique to
perform allocation + in-place construction + assignment to a UniquePtr.
Also, add new UniquePtr constructors that enable (1) default
initialization to null, (2) assume ownership of a pointer to dynamically
allocated memory, and (3) transfer ownership from another UniquePtr.

Test: run simulator and tests
Change-Id: Id8f91d7452ccb19a4bc7acf3ad87e8e2db3bac5f
nique_ptr.h
nique_ptr_impl.h
2b9d71a9f6a9e8cc0e787957d022154231f29962 24-Mar-2017 Brian Duddie <bduddie@google.com> Correct nanoappEnd entry point naming

Was previously referred to as nanoappStop, which does not match the CHRE
API definition.

Test: compile for linux and slpi
Change-Id: I0586a702624f0159e79876608c5955ed974912f1
ntry_points.h
9d5b500a223ef73560f0dce38f50b809bde5dd0d 23-Mar-2017 Brian Duddie <bduddie@google.com> Rework Nanoapp model

Unify Nanoapp into a single monolithic object that directly exposes the
common interfaces implemented in core and platform. As a result of this,
PlatformNanoapp will no longer exist as a separate entity from Nanoapp.
In preparation for dynamic app support, refactor static nanoapp loading
to construct a UniquePtr<Nanoapp> and transfer ownership to the
EventLoop when starting a nanoapp.

This commit includes the first look at the nanoapp support library which
will be used for external nanoapps implemented as dynamic shared
objects.

Test: run chre_test_client with MessageWorld, and run the Linux simulator
Change-Id: Ic17f2c48c3156d1e5bb255b1c6a188908123d5df
ntry_points.h
anoapp/app_id.h
928b06b8c3dde5d402d5f52f26cf0e0292f2572d 22-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Updates parseChreWifiBand to always return a string"
7ea0cef09ad26f2850b5a4a2d3add258dea2a441 22-Mar-2017 Brian Duddie <bduddie@google.com> Implement UniquePtr::release()

Test: run UniquePtr tests
Change-Id: Ifb43f9f6150e897040cbbe842b5bf35da5f4d132
nique_ptr.h
nique_ptr_impl.h
de21e14b333cc8f52db1e759b537c4c1a8e81dd3 21-Mar-2017 Andrew Rossignol <aarossig@google.com> Updates parseChreWifiBand to always return a string

Test: Run on device
Change-Id: Ic65a9907c02d81ce1f10a41dcd9a6323c55725b2
anoapp/wifi.h
0e2f02c628480c36e32c05656e66e108413a5a42 21-Mar-2017 Andrew Rossignol <aarossig@google.com> Extends the logging of WiFi scan events in WiFiWorld

Test: Compile + load on device and view scan results
Change-Id: Ib10c02ec770aaf2b6c65eb968b20660ec2755792
anoapp/wifi.h
7621b3267fd2ff1068d7aa7d75441d68646226ab 19-Mar-2017 Brian Duddie <bduddie@google.com> Reorganize HostProtocol, add hub info query

Split HostProtocol into three classes: one for the host, one for CHRE,
and one that's shared. Since the protocol is not fully symmetric (e.g.
messages to/from nanoapps are the same in both directions, but only one
side will ever request hub info, and only CHRE will ever construct the
response), this avoids pulling in unneeded code.

Also, add support for querying hub information from CHRE to be used in
the HAL, and rework the HostLink pending outbound message queue to be
more generic.

Test: run chre_test_client
Change-Id: Id88485b8c5a085eb886d4059840ac640c0383c88
rray.h
acros.h
da6eaabf8572a16acaebd516dd96ce0063d71e91 18-Mar-2017 Andrew Rossignol <aarossig@google.com> Adds initial WiFi scan event logging to WifiWorld

Test: Compile + run on device
Change-Id: I6e4cd05064c93eb26223b1e69f57b07b8922cedd
anoapp/wifi.h
746ea0ecb99d3f758da17292db549b29720c4442 16-Mar-2017 Andrew Rossignol <aarossig@google.com> Adds getSensorNameForEventType

This is duplicated in two nanoapps and seems useful for logging so let's
stop the copy-pasta and make it available for everyone :)

Test: Run the simulator
Change-Id: I215f8622647bcd2890189687f47ace40c06e47e5
anoapp/sensor.h
a16406ba1a734f21f36a4b0f64b23b062644b6e2 16-Mar-2017 Andrew Rossignol <aarossig@google.com> Adds a nanoapp logging header file

- Updates nanoapps to use this new logging macro
- Updates chre.h to be a system-style include
- Makes using chreLog shorter
- Allows disabling logs below a certain level
- Moves some common log level logic to a new file to be shared

Test: Compile and run the simulator
Change-Id: I81ce7218132f9325b58e2a6792a3bfb6573c30ed
og_common.h
anoapp/log.h
48080e341c2a12db12deb086adce1d487a759141 11-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Adds a const overload of begin() and end() iterators

Change-Id: Ia24d985b602da8c9761f8cf746a0738cf1e3e468
rray_queue.h
rray_queue_impl.h
ynamic_vector_impl.h
ixed_size_vector.h
ixed_size_vector_impl.h
riority_queue.h
riority_queue_impl.h
cea64a899fafc0e75dc0e63dbe699ca5679564ad 09-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Removes one-shot sensor's requests after delivering data to clients

Change-Id: Ieedc53cd140eedfb206eb6e8cdda06894a77fc07
ynamic_vector.h
ynamic_vector_impl.h
30f18903edc1dfe46e12b9989760ef7a56cb31d3 02-Mar-2017 Andrew Rossignol <aarossig@google.com> Implements the chreWifiConfigureScanMonitorAsync CHRE API

Test: Compile only, WifiWorld will be extended next
Change-Id: Idb8a59ec7cbc2808fa08885ffdcd22b14b30d1b6
ynamic_vector.h
ynamic_vector_impl.h
e62f9949c5aa827e175cfb239d9840d7517e8052 02-Mar-2017 Meng-hsuan Chung <menghsuan@google.com> Adds and populates sensor oneShot, onChange and minInterval properties

Change-Id: Iec1962cc95a949ecfbe99661e8ae87d7333792a5
ptional.h
ptional_impl.h
5312518f60833ba29ced8109d037f40bf754214f 02-Mar-2017 Andrew Rossignol <aarossig@google.com> Adds a full() method to the ArrayQueue container with a test

Change-Id: Ia1d77192a4ccd61de5e6b9ba40df09480acd3f82
rray_queue.h
rray_queue_impl.h
bbda86b265077ca90306c5f2e2590807daa39d55 02-Mar-2017 Brian Duddie <bduddie@google.com> Add DynamicVector::copy_array

Introduce new function to support populating a vector by copying
elements out of an existing array.

Change-Id: Ibf37eb48e54322f3723aa0e34930f57a3f744e6f
ynamic_vector.h
ynamic_vector_impl.h
b454fc50edbadc3b212125cabb0503c039aa1d25 02-Mar-2017 Andrew Rossignol <aarossig@google.com> Replaces DynamicVector with FixedSizeVector for WifiSsids

- Also removes a stale TODO.

Change-Id: I847acaea5245a2bbdbaba5dacc8924ba28975b08
ixed_size_vector_impl.h
042f73e3b7f019c818f69b2c097c4b6f9db839b5 22-Feb-2017 Brian Duddie <bduddie@google.com> Add deferCallback() for use by the CHRE system

Leverage the event subsystem to implement a method of invoking a
callback from within the context of an EventLoop at some point in the
future. This can be used to transfer control from a potentially
arbitrary thread in a platform-specific callback, into a known
EventLoop context, as well as to defer processing of some event.

Also, modify EventLoop::postEvent to indicate whether the event was
successfully posted to the queue.

Change-Id: I79e5b8d5aff82fd2fb304b2a1055aebc3047b50d
ixed_size_blocking_queue.h
ixed_size_blocking_queue_impl.h
83be94436ec4d35296e00da877c7198f67b6af44 23-Feb-2017 Brian Duddie <bduddie@google.com> Add DynamicVector::front()

Change-Id: I1653105909346e1c659929effdcc11c9e5bd224d
ynamic_vector.h
ynamic_vector_impl.h
4639307f24f079e7e465a3a17ca90bfac4372ad3 18-Feb-2017 Brian Duddie <bduddie@google.com> DynamicVector: Add clear(), wrap(), and unwrap()

Introduce the ability to wrap an existing buffer so it can be used as a
DynamicVector, plus unwrap to restore the vector to controlling its own
buffer, and add a function to erase all elements in the vector.

Also, refactor to avoid early return in existing functions.

Change-Id: Iee92dbf7ffbfb59615ea0a7bb8fb06740fd09dd4
ynamic_vector.h
ynamic_vector_impl.h
bdeb899511e9431117d4d41315742757ea895225 03-Feb-2017 Andrew Rossignol <aarossig@google.com> Adds a move-assignment constructor to DynamicVector and test

Change-Id: Ibd1e83cbe299832abbe0502d2e8d5484cd6c9c82
ynamic_vector.h
ynamic_vector_impl.h
39993a0032116a71eb51cbf14186eec6bab328f2 01-Feb-2017 Andrew Rossignol <aarossig@google.com> Adds an std::move-based Optional constructor

Change-Id: I2ca5cd1ae4f50eed1d99e4ea35703ede9942f7eb
ptional.h
ptional_impl.h
5ea6fa358541d4b9cc1d9856a0b9291785d7536d 06-Feb-2017 Meng-hsuan Chung <menghsuan@google.com> Rename CompareType to CompareFunction in PriorityQueue/heap

Change-Id: I4d7e9adffef2684e87f8bcbc0aeabfe9e7a8a687
eap.h
eap_impl.h
riority_queue.h
riority_queue_impl.h
e1129bcc6fb320fd1752cd6c900ead2a0595c761 28-Jan-2017 Meng-hsuan Chung <menghsuan@google.com> Iterators: rename const iterators

- Renamed const iterators to cbegin() and cend().
- Added comments for iterator invalidation
- Added iterator tests.

Change-Id: Ia10d33c64d0c543a2791dc93f875a641148298e1
ynamic_vector.h
ynamic_vector_impl.h
ixed_size_vector.h
ixed_size_vector_impl.h
riority_queue.h
riority_queue_impl.h
9b598a5b372a47b8e30113cd5650448ce4ae3418 21-Jan-2017 Meng-hsuan Chung <menghsuan@google.com> Iterator implementation for array queue

Change-Id: Iacf904177d41b00e4496f9df04a3b03a617a9b0b
rray_queue.h
rray_queue_impl.h
1bbcacadd7331e0db5cf17f01e8ba7f451ff6740 27-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a copy-assignment operator to Optional

Change-Id: Iea24e175e0b0aae273d0022b624723554cf45d01
ptional.h
ptional_impl.h
a168da9318a8d996ffd82beacb69a248b11d8569 26-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a move-assignment operator to the Optional container

Change-Id: Ic3cb52605e37b08f70ee4d9da73ece98c040e875
ptional.h
ptional_impl.h
35577195df7ab14e9f58443c2e59293499fe7a8f 26-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a default constructor with inital value to Optional

Change-Id: Ife274c1b539db7413a321d5b515faabcb2221da4
ptional.h
ptional_impl.h
7f40ab39c4b3eb24327edf2be9e74d521d41532f 18-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds resize() to FixedSizeVector and ARRAY_SIZE macro to util

Change-Id: I1a095ef8ba644111edb5599f430af51e7bdb2fbf
rray.h
ixed_size_vector.h
ixed_size_vector_impl.h
fe38dd8c9780b599cf2eff09ff6fbf60fbe9ab76 18-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds an Optional container to util and tests

Change-Id: I12d6144baeaa66f5cbbee414d3be8c48b641fceb
ptional.h
ptional_impl.h
f025d4a118047d7763d75ff50c37fdd2819ba8eb 25-Jan-2017 Andrew Rossignol <aarossig@google.com> Removes a TODO from the MemoryPool, it is done

- The SynchronizedMemoryPool facilitates this need.

Change-Id: I2f0bc8cd8ca0e8c24c6568d9cd5532570221f7bd
emory_pool_impl.h
90c04ef3564eb228eebb5da5b21bb80e5e46e299 13-Jan-2017 Meng-hsuan Chung <menghsuan@google.com> Iterator implementation

Added implementation for containers whose iterator can rely on pointer
arithmetics, which includes FixedSizeVector, DynamicVector and PriorityQueue.

Change-Id: Iee5b682fd093360e11ff47506d5cb21ff804ca21
ynamic_vector.h
ynamic_vector_impl.h
ixed_size_vector.h
ixed_size_vector_impl.h
riority_queue.h
riority_queue_impl.h
c22313712cce1ffe297ad5243fc6fe28b9bcad01 18-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a move-assignment version of push_back to DynamicVector

Change-Id: I5bff2f543f41edc5056e690ac0439fe0be86888e
ynamic_vector.h
ynamic_vector_impl.h
58d03812b7cce3a90c39cd30bbff6531cc3e6e30 12-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a utility function for interval to SMGR rate conversion

- Adds tests that run on Linux as this has no dependencies on the SLPI.

Change-Id: I6cd082233863afe41f85b8fd723278b5202cff30
ime.h
ime_impl.h
f546f4c27e66dc4ea868e660cebac9ba0c31fad9 11-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a SensorRequest class

- Implements the RequestMultiplexer API
- Adds tests to verify the behavior of the request
- Adds a SensorRequest instance to the PlatformSensor class
- Builds infrastructure for setting the platform sensor configuration

Change-Id: I6c4bd2e8bd4c58610a6c63d0f49bbd971d1bb9e0
ime.h
ime_impl.h
6ba2805af752a364b74397c7f1fe70ee35bc83b7 10-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a UniquePtr class to util

- Similar to std::unique_ptr
- Adds tests

Change-Id: I74ac7881bd5d1fecf3d8348a5cf47a4ac420586d
nique_ptr.h
nique_ptr_impl.h
8acb65434c74048a032a57f5321baeb028f6bdf3 10-Jan-2017 Andrew Rossignol <aarossig@google.com> Update DynamicVector to use std::move when possible

- Adds a test to verify the behavior.

Change-Id: I3250c2e1aac98aea44d8e1793536d5026fbae57d
ynamic_vector_impl.h
c265103d508f74c2bec5fcdd42e960c044bb19c5 10-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a back() method to DynamicVector

Change-Id: I25660c2dedfecf2bce95f5d530cdab5178cfead1
ynamic_vector.h
ynamic_vector_impl.h
c7c70aa903fdef3a6074cdb06d266b6ad3821d27 10-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a Singleton template

- Allows for one instance of a given type and uses static storage with
deferred initialization.
- Provides a lifecycle test to validate the behavior

Change-Id: I76fa737f50612be1386df4bf79733c86814d56fa
ingleton.h
ingleton_impl.h
fa589941fe8c8aa1ff0d8fb9ee1445dba6382768 10-Jan-2017 Andrew Rossignol <aarossig@google.com> Adds a missing include to PriorityQueue

Change-Id: I1380e60e36166466e9c3ebeebe60690fd383c0a4
riority_queue.h
021aae0ed1c9ff80d9ffef6b1114f030138c25d2 07-Jan-2017 Meng-hsuan Chung <menghsuan@google.com> priority queue: update to use heap data structure

Change-Id: I35e95c597db9eb9eed3fda21bb02d1268cc8fe74
ynamic_vector_impl.h
ixed_size_vector_impl.h
riority_queue.h
riority_queue_impl.h
12048259ea9203bccb00460b821a40731249f1e2 04-Jan-2017 Meng-hsuan Chung <menghsuan@google.com> Heap implementation

Functions inspired by std:push_heap and std:pop_heap are added.

Currently, they only work with FixedSizeVector and DynamicVector.
FixedSizeVector and DynamicVector are also modified to add support
for required methods.

Change-Id: Id05d3ad996ebe9cf8b0250f50da2bf031a7b6f82
ynamic_vector.h
ynamic_vector_impl.h
ixed_size_vector.h
ixed_size_vector_impl.h
eap.h
eap_impl.h
022cc6c770c299bb364e35377a2661791475bbce 22-Dec-2016 Andrew Rossignol <aarossig@google.com> Renames BlockingQueue to FixedSizeBlockingQueue.

- Updates EventLoop to use a FixedSizeBlockingQueue.
- Updates tests.

Change-Id: I680bdbc3d2039e14b8250cb291bbb8292a304c74
rray_queue_impl.h
locking_queue.h
locking_queue_impl.h
ixed_size_blocking_queue.h
ixed_size_blocking_queue_impl.h
f8d6e050ae7a17b5a96886135872d615d111a84a 22-Dec-2016 Andrew Rossignol <aarossig@google.com> Adds find() to DynamicVector

Change-Id: I707cf83aaaff71c5f37e839fbdf4feac82028537
ynamic_vector.h
ynamic_vector_impl.h
f9fe99d728ad476dc941be5a9dff1e20402c3754 22-Dec-2016 Meng-hsuan Chung <menghsuan@google.com> Priority queue implementation

This is a first step to get the interface and behavior right.
Internally it's a linear array with O(N) push/pop.
The next step is to use heap with O(logN) complexity.

Change-Id: Icbe4842b8515c2fb95a4ec2388a8ecd4243967d2
riority_queue.h
riority_queue_impl.h
af8a810ee31e82fb1a5b18d3caef98633ba22799 22-Dec-2016 Andrew Rossignol <aarossig@google.com> Replaces std::lock_guard with chre::LockGuard.

Change-Id: Ie4987889f2b6ac2b9a6a87ceadc77a7382f31049
locking_queue_impl.h
ynchronized_memory_pool_impl.h
ac023ca930f64b385a77f89cb332e312f9b07362 22-Dec-2016 Andrew Rossignol <aarossig@google.com> Adds a LockGuard to util.

Change-Id: I1f58f2c71f4449ed05a9be45fc2ee0c9f5c4655f
ock_guard.h
ock_guard_impl.h
aab84350d333c03bc6d6e52841e291f66f8e0aae 21-Dec-2016 Andrew Rossignol <aarossig@google.com> Implements timers for the SLPI platform

Change-Id: I89207e07dcd0837bc632277c10eb9ebcad9b4274
ime.h
ime_impl.h
c85b8ca82e6d7f313d1aef0609eac687eb00d548 20-Dec-2016 Andrew Rossignol <aarossig@google.com> Moves platform ID constants to common, implements SLPI version

Adds an mk for the chre API.

Change-Id: I7e37b6fb0be4696f438e054b453b7e8e21b90a68
d_from_string.h
d_from_string_impl.h
926f1b91231f88c3669f10dec8f56e24ae16b957 21-Dec-2016 Andrew Rossignol <aarossig@google.com> Renames ASSERT to CHRE_ASSERT

- Provides a stub implementation for the SLPI.
- Avoids collision with Qualcomm ASSERT macros.

Change-Id: Ib6d99e41caf5cccf022fc8d88d2a05e95d2fd747
rray_queue_impl.h
ynamic_vector_impl.h
ixed_size_vector_impl.h
1ac3c0452b56dd51719e7d3f44efad3d0bc0116f 20-Dec-2016 Andrew Rossignol <aarossig@google.com> Implements SystemTime for the SLPI

- Adds mk files for core, util and platform
- Extends the search path for includes
- Requires an SLPI tree to build now (using SLPI-static image
functionality)

Change-Id: If83dece1dcf610c3c75bbc47204fcaafa8fd9801
ime.h
ime_impl.h
725bef45ca127971b3ea798cd1f4e4b2c0d8fe9d 10-Dec-2016 Andrew Rossignol <aarossig@google.com> Implements portions of the SystemTimer.

- Supports requesting a timer and delivering events.
- TimerHandle generation logic.
- Multiplexes multiple requests into one underlying timer.
- Adds a TimerWorld sample app to test cyclic and one-shot timers.

Change-Id: Id992790b49618f94ab2a7ce76098394e5cc161d4
ime.h
ime_impl.h
ea9fd91360a23da4652a5c51eb2e909ff765fe9e 12-Dec-2016 Andrew Rossignol <aarossig@google.com> Adds support for erase to DynamicVector and a test

Change-Id: I2de7cffed676e7e8db482873f3092c43dd1438b8
ynamic_vector.h
ynamic_vector_impl.h
3fe2daaded2dc07da1175e3d5655d7dd956a0ba9 12-Dec-2016 Andrew Rossignol <aarossig@google.com> Adds support for insert to DynamicVector and tests

Change-Id: If5b2d2a413a0aa190fedc454099e67af698466c5
ynamic_vector.h
ynamic_vector_impl.h
89aa0dd2e1f0a7cde9c6ec808f0cdcce33f35a62 12-Dec-2016 Andrew Rossignol <aarossig@google.com> Adds NonCopyable to containers.

Eventually we can implement copy, but we don't need it right now so it
is safer to mark it as unavailable.

Change-Id: Ie1d7f8a7ff1e5522baa227fca91b6d6ab14c9ccb
rray_queue.h
ynamic_vector.h
ixed_size_vector.h
0a28dc2f6cbe1c064d95f6ea88bce83401fd8607 15-Nov-2016 Meng-hsuan Chung <menghsuan@google.com> [ArrayQueue] a circular buffer based implementation

Change-Id: Icd5e8368ac6715e2b4c42dfd07f2ddd825059813
rray_queue.h
rray_queue_impl.h
3eaba1f8aa56dbc86fa8118d5314f97423cf5e84 08-Dec-2016 Andrew Rossignol <aarossig@google.com> Implements DynamicVector and adds tests

Change-Id: Ia27c6bce172c4f2b2a4d7db6378dc862a0644bf9
ynamic_vector.h
ynamic_vector_impl.h
7bff27b2f4f5374a8f20a89b38067236535aa473 08-Dec-2016 Andrew Rossignol <aarossig@google.com> Documents the SystemTimer class, prefers Nanoseconds over uint64_t

- Adds a conversion from milliseconds to nanoseconds.
- Adds a little more documentation around the Linux implementation.
- The set function now accepts the callback and data to pass in to allow
reusing the same timer.

Change-Id: I4c17c96db3922b73e6675d5718a1ea55a13e4c37
ime.h
ime_impl.h
aa718a9536c0547620c183d90195bfb0f76f8284 08-Dec-2016 Andrew Rossignol <aarossig@google.com> Implements a platform abstraction for a condition variable

- Updates the blocking queue to use the new mutex and condition variable
abstractions.
- Removes noncopyable from the //util:util target due to a cyclic
dependency.

Change-Id: I97540b2322ff1492a4c3241b4984e4feb1a916f3
locking_queue.h
locking_queue_impl.h
f7914d0fbadf2644c0c4096380c741bee2a026e0 07-Dec-2016 Andrew Rossignol <aarossig@google.com> Implements the SynchronizedMemoryPool.

The event loop is updated to use the synchronized variant.

Change-Id: I23c493d5c79f1961e251d813c53a92b3ebdbdc3a
ynchronized_memory_pool.h
ynchronized_memory_pool_impl.h
a1d5686c7513f6b8a436efd9f554d8c2227a2291 07-Dec-2016 Brian Duddie <bduddie@google.com> Adds a platform abstraction for a mutex.

- Adds a SynchronizedMemoryPool shell.
- Includes SynchronizedMemoryPool in the EventLoop to verify
that compilation succeeds. The MemoryPool will eventually be replaced.

Change-Id: I932da11c303b5f757168d729f9c7a7874627cfb6
ynchronized_memory_pool.h
ynchronized_memory_pool_impl.h
4927ee586656424c827920876673228fbdcf27c3 25-Nov-2016 Andrew Rossignol <aarossig@google.com> Implements the MemoryPool and integrates with the EventLoop

Unit tests are also added to the MemoryPool.

Change-Id: Icaf521c9b683d9a21a73995f6ce4a70a5ed1e9f7
ixed_size_vector.h
ixed_size_vector_impl.h
emory_pool.h
emory_pool_impl.h
736620171d63e1f0c0be70f9c27e2679fca5eaad 25-Nov-2016 Andrew Rossignol <aarossig@google.com> Adds a FixedSizeVector and tests.

This provides the same API as the DynamicVector but uses statically
allocated storage.

Change-Id: Ie26245ebf0bce8d924413ba80bbc1b392b5e3309
ixed_size_vector.h
ixed_size_vector_impl.h
e64f180233e64c40b56993cfea3696c5b4b16395 04-Nov-2016 Brian Duddie <bduddie@google.com> Initial import of CHRE source from external repo

Starting at commit 46a52e0 from contexthub-base.

Change-Id: I373f3a99b74757daae465b78a3d19bfce4770364
rray_queue.h
locking_queue.h
ynamic_vector.h
ynamic_vector_impl.h
ntry_points.h
d_from_string.h
d_from_string_impl.h
on_copyable.h
ime.h
ime_impl.h