Deleted Added
sdiff udiff text old ( 12800:7736882bdea5 ) new ( 14067:2c3667b32607 )
full compact
1/*
2 * Copyright (c) 2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 147 unchanged lines hidden (view full) ---

156 Coroutine& operator=(const Coroutine& rhs) = delete;
157
158 /**
159 * Coroutine constructor.
160 * The only way to construct a coroutine is to pass it the routine
161 * it needs to run. The first argument of the function should be a
162 * reference to the Coroutine<Arg,Ret>::caller_type which the
163 * routine will use as a way for yielding to the caller.
164 *
165 * @param f task run by the coroutine
166 */
167 Coroutine(std::function f)
168 : Fiber(), task(f), caller(*this)
169 {
170 // Create and Run the Coroutine
171 this->call();
172 }
173
174 virtual ~Coroutine() {}
175
176 public:
177 /** Coroutine interface */
178
179 /**

--- 87 unchanged lines hidden ---