#
e633bdc3 |
|
20-Aug-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel] Rename "in_int_handler" to "blocking_disallowed" The name "in_int_handler" is misleading because the field is only set to true for part of the interrupt handler -- the part during which blocking operations are disallowed. Rename the field to reflect its actual meaning. Bug: none Test: build Change-Id: Iab41d3650ea805b8de0b13de76b64c5819f48b2f
|
#
f2aaaf4c |
|
19-Jul-2018 |
Corey Tabaka <eieio@google.com> |
[kernel] Lockdep instrument the vm and thread_lock. - Instrument the locks used by the vm. - Instrument the thread lock and remainning core kernel code. - Leaving remaining arch/lib/driver code for a later CL. Bug: ZX-23 Test: k ut all and system/test/* pass + manual testing. Change-Id: Ie3f6a27e81bcd1890d63f2fafda3ee233f7969ef
|
#
03a22a2d |
|
16-Apr-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][thread] Add "resched_disable" count for deferring thread rescheduling This is similar to "preempt_disable", except that it does not block pre-emption by interrupt handlers. We now have a single field in thread_t containing two disable counts so that it can be checked with a single memory access. The logic wrapping interrupt handling becomes a bit more complex. I have moved it into functions defined in a new header, interrupt.h, so that it can be shared across architectures and tested by unit tests. We now save and restore preempt_pending so that we can tell whether an interrupt handler has set it to true. Unit tests: For each test of preempt_disable that runs outside of interrupts, I have added a test of resched_disable. ZX-1690 Change-Id: I4d33d5c604709a31f3c9f2d82a18e5d24ad8b5f2
|
#
b58bad29 |
|
04-Apr-2018 |
Nick Maniscalco <maniscalco@google.com> |
[kernel] Move unittest.h to include/lib/unittest/ Move unittest.h deeper in the tree so include statements will say: Change-Id: I85cb027a53530cd2003d813f004aaea3509f9f40
|
#
e668e954 |
|
21-Mar-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][tests] Use fbl::atomic<> rather than 'volatile' Atomic accesses have cleaner semantics than volatile accesses, such as including memory barriers by default. ZX-1690 Change-Id: I5e3f47e5eaaa85fabf95a1b7cf9e7d4f42da3916
|
#
3d2f1c55 |
|
21-Mar-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][tests] Use thread_sleep_relative() rather than thread_sleep() Since thread_sleep_relative() is available, we might as well use it, for readability. ZX-1690 Change-Id: Iaf86f934eab2a477980efaa65e6c92317f480194
|
#
baa55d45 |
|
12-Mar-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][tests] Avoid a possibility of flaky failure in a preempt_disable test Remove an unnecessary assertion. 100usec is often enough that timer_set() returns before the timer has run, but it's not always enough, in which case the EXPECT_EQ() would fail. Rather than increasing the wait time that we pass to timer_set(), we can just remove this assertion, which I had originally added just to make sure that the "while (!timer_ran)" loop works properly. ZX-1690 ZX-1820 Change-Id: I133e1996a519e8f74075043c73ddb012a254fdc8
|
#
b8a66907 |
|
12-Mar-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][thread] Allow thread_preempt_disable() outside of interrupt handlers Change the preempt_disable field to be a counter instead of a bool, and check preempt_pending only when preempt_disable is decremented to zero. ZX-1690 Change-Id: If1adefe53a23e7fb3cb4bae3a3421bb08fcb7af2
|
#
55f571e0 |
|
05-Mar-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][unittest] Remove unused "void* context" argument from test cases This argument is always NULL. This argument was part of an init/cleanup feature that was unused and that was removed. Change-Id: I997a268be10c6837b2d7529fb92c2df2e3bab814
|
#
b7def50e |
|
28-Feb-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][unittest] Remove unused init/cleanup function parameters None of the in-kernel test cases provide init or cleanup functions. They all pass NULL to UNITTEST_END_TESTCASE() for those parameters, so we can remove those parameters. Note that unittest.c wasn't actually using the cleanup function. Change-Id: I0332bc5c870deec8a021f543ec2c31ef95c30d0f
|
#
3e81de2e |
|
28-Feb-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][unittest] Rename REQUIRE_* to ASSERT_* to match userland's unittest.h This is also more consistent with gtest. Change-Id: Ic39e75c41a55ca5cba2d09cb920c7cd1c1c7a899
|
#
8c4f7d9d |
|
22-Feb-2018 |
Mark Seaborn <mseaborn@google.com> |
[kernel][tests] Add a basic unit test for preempt_disable/preempt_pending This just tests that preempt_disable is set for timer callbacks, and that preempt_pending will get set by some functions in this context. ZX-1690 Change-Id: I41c6d698272a85abe27732121e0fdb0096b2a3dd
|