summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* clang-format: Apply update 6 -> 8 fixesHEADmasterWilliam A. Kennington III2019-06-271-2/+3
| | | | | Change-Id: I327de53cbed42d46b88f40f0b15637fda6896f8b Signed-off-by: William A. Kennington III <wak@google.com>
* sdevent: Support source destroy callbacksWilliam A. Kennington III2019-04-264-1/+25
| | | | | | | Will be needed to support heap allocated userdata and floating sources. Change-Id: I927acb3e03fb6c724e762b3ac47cd0d4d297ef87 Signed-off-by: William A. Kennington III <wak@google.com>
* sdevent: Support getting userdataWilliam A. Kennington III2019-04-263-0/+9
| | | | | | | Will be needed when we start storing the userdata on the heap Change-Id: I31d2c2b6741d0a4422a79b4d0a752d352121ae3c Signed-off-by: William A. Kennington III <wak@google.com>
* autotools: RemoveWilliam A. Kennington III2019-04-268-419/+0
| | | | | | | Meson is now used to build this package in all of the necessary places. Change-Id: Ic5155621967fa94ec03eced2193e0d453b174eba Signed-off-by: William A. Kennington III <wak@google.com>
* meson: Use declare_dependency for librariesWilliam A. Kennington III2019-04-034-16/+16
| | | | | | | | | Now example binaries and tests don't have to be aware of the nuances for configuring the build to use the library. This makes the project library look like any other system dependency. Change-Id: Ife3bcd3dcbd423f08c513f9a05fc8cabff41e2f6 Signed-off-by: William A. Kennington III <wak@google.com>
* meson: Style fixWilliam A. Kennington III2019-04-031-3/+2
| | | | | Change-Id: I9b4b86ecfab6649671b24d957bd47c7e8e375e21 Signed-off-by: William A. Kennington III <wak@google.com>
* source/base: Fix docs for owning constructorWilliam A. Kennington III2019-04-011-0/+1
| | | | | Change-Id: I22667a652bc4db8afc05aea1736b678a213a7e89 Signed-off-by: William A. Kennington III <wak@google.com>
* source/base: sourceCallback forward reference type informationWilliam A. Kennington III2019-03-291-2/+4
| | | | | Change-Id: I2006ae1a116ec9a664d0dd3b56ed5242f8dbd469 Signed-off-by: William A. Kennington III <wak@google.com>
* internal/utils: performCallback should preserve argument referencesWilliam A. Kennington III2019-03-292-3/+21
| | | | | | | | Arguments including the function are now passed with reference types forwarded. Change-Id: I32cf4704737faa6c140d16352528ceb0d738f5b8 Signed-off-by: William A. Kennington III <wak@google.com>
* example/heartbeat: Add signal handlingWilliam A. Kennington III2019-03-294-3/+27
| | | | | | | | | This makes the example a little more interesting as we now have multiple sources and we can analyze memory safety with valgrind by just sending a SIGINT to quit cleanly. Change-Id: Id15fe58f798d3b137f91228025f48a5e4cd5fc50 Signed-off-by: William A. Kennington III <wak@google.com>
* sdevent: Fix missing parameter namesWilliam A. Kennington III2019-03-291-4/+4
| | | | | Change-Id: I46fb9436fa955ea7c5a3f2319a4332925ef33729 Signed-off-by: William A. Kennington III <wak@google.com>
* tree-wide: Use cexec for checking callsWilliam A. Kennington III2019-03-299-206/+139
| | | | | | | | | | This makes error handling guaranteed and slightly more compact. Tested: Ran through unit test suite. Change-Id: If12cf25302390e5e5238f80b4fdb7ea577b5b5c8 Signed-off-by: William A. Kennington III <wak@google.com>
* source/base: Remove unused ref constructorWilliam A. Kennington III2019-03-293-48/+2
| | | | | | | | | | | | We don't ever use this constructor and it was effectively package private. Remove it as we don't ever need to add references to our sd_event_source*. Tested: Built and run through unit test suite. Change-Id: I1ca9fd4ecfdef1a3fd5aa2ca214be657c1a04b94 Signed-off-by: William A. Kennington III <wak@google.com>
* internal/sdref: Remove in favor of stdplus/handleWilliam A. Kennington III2019-03-2915-454/+63
| | | | | | | | | | | We no longer need to roll our own managed handle type now that stdplus implements a generic one. Tested: Built and run through unit tests. Change-Id: Id34cd8d3ffacf7901d49cac335fa93f744f0e310 Signed-off-by: William A. Kennington III <wak@google.com>
* tree-wide: Use get() helper instead of direct accessWilliam A. Kennington III2019-03-296-38/+30
| | | | | | | This makes it easier to refactor the handle used to hold the pointers. Change-Id: Ie6eaf9cab998039f18d61a6321774a3db3fa5564 Signed-off-by: William A. Kennington III <wak@google.com>
* meson: Add version to libraryWilliam A. Kennington III2019-03-281-0/+1
| | | | | | | | Otherwise bitbake will treat it as a private library and not move it to the proper directory and generate the necessary shlib metadata. Change-Id: Ibc1409fd63ff1d73ef97e9fb7ed4aa370807c0a9 Signed-off-by: William A. Kennington III <wak@google.com>
* autotools: Fix for autoconf-archive 2019.01.19William A. Kennington III2019-03-184-3/+17
| | | | | | | | | The code coverage macros from the archive changed in a backward incompatible way. This adds a workaround to autodetect either version and do the right thing Change-Id: Ic010ed59fb332e19e5c76f60e55f864f8f4a43f8 Signed-off-by: William A. Kennington III <wak@google.com>
* clang-tidy: Basic configurationWilliam A. Kennington III2018-12-133-2/+10
| | | | | | | | | | | This also cleans up some outstanding issues detected by the configuration. Tested: Ran through unit test scripts. Change-Id: I3357a2280a681a87532d6d72315260db2ab73e87 Signed-off-by: William A. Kennington III <wak@google.com>
* meson: Add alternative build systemWilliam A. Kennington III2018-12-135-0/+119
| | | | | | | | For now both autotools and meson will be maintained side by side. Eventually we should remove the autotools build system. Change-Id: I04382b17d5267ee218e2658fc163da17853f637a Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Implement callback settingWilliam A. Kennington III2018-10-303-0/+19
| | | | | | | | | | | All of the other classes that take callbacks support having the callback updated. Tested: Builds and passed through the unit test suite. Change-Id: I0efcd074523fa6ec0cc84c7a930346dd9340f7ec Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Make movableWilliam A. Kennington III2018-10-293-2/+74
| | | | | | | | | | | | Now that we can update the callbacks of our sources, we can move the timer object freely by updating the callback when moved. Tested: Unit tests pass, and we no longer see any valgrind issues when moving the timer object. Change-Id: I15baf97538459ca8b9c48b75dba77d09b7b5075b Signed-off-by: William A. Kennington III <wak@google.com>
* source/*: Make updating callbacks possibleWilliam A. Kennington III2018-10-2915-0/+77
| | | | | | | | | | | | Sometimes callers want to be able to update the callback used when the source is acted upon. This is needed for updating references stored in the callback. Tested: Run through the unit test suite. Change-Id: I78bda32569287964bfc9d49501869d3a2b497f3d Signed-off-by: William A. Kennington III <wak@google.com>
* clock: Make it possible to move assignWilliam A. Kennington III2018-10-291-1/+1
| | | | | | | | | | | | When the internal Event is const, it makes it impossible to generate the implicit move constructors since moving an Event is non-const. Tested: Object is now movable by containers. This was verified by using a future commit that requires movability of timers. Change-Id: Id9859806899443e3daf425dacd4bd23fe9a52f58 Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Make it possible to get the EventWilliam A. Kennington III2018-10-183-0/+13
| | | | | | | | | | | | Other event sources expose the ability to get th event used for constructing the source. Since our timer is basically just a time source, we should be able to trivially get the event object. Tested: Built and run through unit tests Change-Id: I4b4192797652a903cba90d6e73771014df7702d6 Signed-off-by: William A. Kennington III <wak@google.com>
* source/signal: Clarify signal bocking during constructionWilliam A. Kennington III2018-09-261-1/+2
| | | | | | | | | Blocking signals is a potentially unexpected requirement of the user prior to constructing a signal source. Clarify this requirement base on guidance from the sd_event_add_signal(3) docs. Change-Id: I34335f1882acbf54a3219324e4e23e803a763365 Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Implement oneshot timersWilliam A. Kennington III2018-09-266-38/+303
| | | | | | | | | | | | | | | This change is meant to enable users of the old openbmc timer class to trivially use the timer if they only want single executions. It also makes setting up the timer less verbose if you do not already know the timeout interval. Tested: Run through unit tests and did a sample integration with phosphor-watchdog and phosphor-networkd. Verified that the new oneshot example works as expected. Change-Id: I2cd006d1f19fff99bce3f732a16eac9ca9553666 Signed-off-by: William A. Kennington III <wak@google.com>
* example: Add a repeating timer sampleWilliam A. Kennington III2018-09-264-0/+42
| | | | | | | | | Tested: Ran through unit test suite and manually executed the example program to make sure it works as expected. Change-Id: I77cffdd038df4eab774f0d162f49273650638ad6 Signed-off-by: William A. Kennington III <wak@google.com>
* example/heartbeat: RefactorWilliam A. Kennington III2018-09-261-8/+13
| | | | | | | | | | | This cleans up the clock and time source declarations by defining the ClockId and Timer types up front. Tested: Built the example and it runs as expected. Change-Id: I67326f5804f8eea54624150f6aa5d735bbde05fd Signed-off-by: William A. Kennington III <wak@google.com>
* utility/timer: Callback should pass in the timerWilliam A. Kennington III2018-09-253-3/+3
| | | | | | | | | | | | | | This makes the timer better resemble the other source types, and makes it easier to access timer properties from the callback. Since we do not yet have any committed users of this API it is safe to change it. Tested: Unit tests were run and builds work fine. Change-Id: I9ecb24a20bc822b2ab55900e47a7cae834ba873d Signed-off-by: William A. Kennington III <wak@google.com>
* source/signal: DocumentWilliam A. Kennington III2018-09-251-0/+37
| | | | | | | | This file was missing documentation from the initial commits to this repository. Change-Id: I3eb195591ca58f77cb44642c8dcca7dd9cfbf471 Signed-off-by: William A. Kennington III <wak@google.com>
* documentation: Cleanup and clarificationWilliam A. Kennington III2018-09-254-3/+24
| | | | | | | | This change clarifies some of the built-in sd_event behavior and points the reader to the relevant sd_event documentation where applicable. Change-Id: Ic12d6a2d4364aa529240660a532af2bde4a4d89f Signed-off-by: William A. Kennington III <wak@google.com>
* Spelling fixesGunnar Mills2018-09-211-1/+1
| | | | | | | | | Spelling errors found using github.com/lucasdemarchi/codespell A tool to fix common misspellings. This tool is licensed under GNU General Public License, version 2. Change-Id: I4f11e1fbf3f74e63787b15a126de0e68e5266036 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* utility/timer: ImplementWilliam A. Kennington III2018-09-196-0/+536
| | | | | | | | | | | | | We often need a continually ticking timer for our daemons. This utility wraps an sd_event time source as a convenience. This is meant to be a usable replacement for the timer.hpp found in other openbmc projects. Tested: New tests pass with full coverage. Changes to the phosphor-watchdog that rely on this utility work as expected. Change-Id: Id12aed9e5b018e7eca825c4a7ac7b4f46e2f04c6 Signed-off-by: William A. Kennington III <wak@google.com>
* source/io: Fix documentationWilliam A. Kennington III2018-09-191-3/+4
| | | | | | | | The original constructor documentation was copied and pasted incorrectly from somewhere else. Change-Id: Iac8dbd197e710d4079400c99c368f07c32f90a9d Signed-off-by: William A. Kennington III <wak@google.com>
* source/time: Fix missing documentationWilliam A. Kennington III2018-09-191-0/+52
| | | | | | | Documentation was accidentally left out of this class Change-Id: I977caf9fbb716f2fcb3510f722712fdf695441b7 Signed-off-by: William A. Kennington III <wak@google.com>
* test: Build test cases with their respective c++ filesWilliam A. Kennington III2018-09-192-16/+16
| | | | | | | | | | | | The current build situation places the test wrappers and logs into the top level test directory. We can actually build and run these binaries ink the subdirectories containing the test sources. Do this. Tested: Run through the unit test suite and all test still show up and pass. Change-Id: Ia5c9957242ae4df88dca6433682dc66bbbc3d684 Signed-off-by: William A. Kennington III <wak@google.com>
* pkg-config: Add missing description fieldWilliam A. Kennington III2018-09-121-0/+1
| | | | | | | | | The old school `pkg-config` utility parses .pc files fine if they are lacking description. However, using `pkgconf` will silently fail to find the .pc file. Change-Id: I690614de15c7d095bb4066ba4329045c86e4ee0e Signed-off-by: William A. Kennington III <wak@google.com>
* Upgrade to C++17William A. Kennington III2018-09-113-7/+8
| | | | | Change-Id: I0efd11f488ceee9b1a03ffaa1522cf0182ae1aca Signed-off-by: William A. Kennington III <wak@google.com>
* configure: Fix accidentally used tabsWilliam A. Kennington III2018-08-231-2/+2
|
* configure: Fix location of code coverage disablementWilliam A. Kennington III2018-08-161-1/+1
|
* configure: Fix building when tests are disabledWilliam A. Kennington III2018-08-161-13/+11
|
* configure: Style fixesWilliam A. Kennington III2018-08-141-3/+4
|
* source/io: Document headerWilliam A. Kennington III2018-07-241-0/+60
|
* source/event: Document headerWilliam A. Kennington III2018-07-241-0/+48
|
* source/child: Document headerWilliam A. Kennington III2018-07-241-0/+36
|
* source/base: More documentationWilliam A. Kennington III2018-07-241-1/+44
|
* source/base: Improve some method typesWilliam A. Kennington III2018-07-234-18/+30
|
* source/base: Document headerWilliam A. Kennington III2018-07-231-0/+65
|
* exception: Document headerWilliam A. Kennington III2018-07-231-0/+9
|
* clock: Document headerWilliam A. Kennington III2018-07-231-0/+17
|
OpenPOWER on IntegriCloud