diff options
author | Gabe Black <gabeblack@google.com> | 2018-06-07 21:37:18 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-06-21 19:13:43 +0000 |
commit | 3ed0c3c0bef2eefddcf2033e6ab9d22cf45c486d (patch) | |
tree | b5317c650eac63fcf28ed088adc937b61eb23e3c /ext/dsent | |
parent | 7ad7ea26b5b11d4fa392282c2e6159d0089d0342 (diff) | |
download | gem5-3ed0c3c0bef2eefddcf2033e6ab9d22cf45c486d.tar.xz |
base: Add a class which encapsulates Fibers.
This class encapsulates the idea of a Fiber in such a way that other
implementations can be substituted in in the future. This
implementation uses the ucontext family of functions.
This change also adds a new unit test which exercises the new class. It
creates three new fibers which accept a sequence of other fibers to
switch to, one after the other. The main test function switches to
the these fibers which switch with each other and occasionally back to
the main fiber. Each time a test fiber is activated, it checks against
a list which shows the correct order for the fibers to run in. When the
main fiber gets control, it makes sure that list has been progressed
through by the correct amount.
Change-Id: I1fc2afa414b51baaa91e350a4ebc791d989f0b8a
Reviewed-on: https://gem5-review.googlesource.com/10935
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'ext/dsent')
0 files changed, 0 insertions, 0 deletions