Home
last modified time | relevance | path

Searched refs:fiber (Results 1 – 25 of 161) sorted by relevance

1234567

/third_party/boost/libs/fiber/doc/html/
Dfiber_HTML.manifest2 fiber/overview.html
3 fiber/overview/implementations__fcontext_t__ucontext_t_and_winfiber.html
4 fiber/fiber_mgmt.html
5 fiber/fiber_mgmt/fiber.html
6 fiber/fiber_mgmt/id.html
7 fiber/fiber_mgmt/this_fiber.html
8 fiber/scheduling.html
9 fiber/stack.html
10 fiber/stack/valgrind.html
11 fiber/stack/sanitizers.html
[all …]
/third_party/boost/boost/fiber/
Dfiber.hpp40 class BOOST_FIBERS_DECL fiber { class
53 fiber() = default;
57 typename = detail::disable_overload< fiber, Fn >,
62 explicit fiber( Fn && fn, Arg && ... arg) : in fiber() function in boost::fibers::fiber
64 fiber( Fn && fn, Arg ... arg) : in fiber()
66 fiber{ launch::post, in fiber()
73 typename = detail::disable_overload< fiber, Fn >
76 fiber( launch policy, Fn && fn, Arg && ... arg) : in fiber() function in boost::fibers::fiber
78 fiber( launch policy, Fn && fn, Arg ... arg) : in fiber()
80 fiber{ policy, in fiber()
[all …]
/third_party/boost/libs/fiber/doc/
Dfiber.qbk14 #include <boost/fiber/all.hpp>
19 class fiber;
20 bool operator<( fiber const& l, fiber const& r) noexcept;
21 void swap( fiber & l, fiber & r) noexcept;
56 boost::fibers::fiber f1; // not-a-fiber
59 boost::fibers::fiber f2( some_fn);
67 A new fiber is launched by passing an object of a callable type that can be
71 that the referenced object outlives the newly-created fiber.
77 boost::fibers::fiber copies_are_safe() {
79 return boost::fibers::fiber( x);
[all …]
Dmutexes.qbk13 #include <boost/fiber/mutex.hpp>
33 __mutex__ provides an exclusive-ownership mutex. At most one fiber can own the
37 Any fiber blocked in __lock__ is suspended until the owning fiber releases the
45 [[Precondition:] [The calling fiber doesn't own the mutex.]]
46 [[Effects:] [The current fiber blocks until ownership can be obtained.]]
57 [[Precondition:] [The calling fiber doesn't own the mutex.]]
58 [[Effects:] [Attempt to obtain ownership for the current fiber without
60 [[Returns:] [`true` if ownership was obtained for the current fiber, `false`
72 [[Precondition:] [The current fiber owns `*this`.]]
73 [[Effects:] [Releases a lock on `*this` by the current fiber.]]
[all …]
Dcustomization.qbk23 The library's fiber manager keeps track of suspended (blocked) fibers. Only
24 when a fiber becomes ready to run is it passed to the scheduler. Of course, if
27 implementation start to influence the overall sequence of fiber execution.
30 fiber priority. We will implement it such that a fiber with higher priority is
31 preferred over a fiber with lower priority. Any fibers with equal priority
41 each fiber.[footnote A previous version of the Fiber library implicitly
42 tracked an int priority for each fiber, even though the default scheduler
44 scheduler-specific fiber properties.]
46 One might suggest deriving a custom [class_link fiber] subclass to store such
49 # __boost_fiber__ provides a number of different ways to launch a fiber.
[all …]
Dmigration.qbk16 Each fiber owns a stack and manages its execution state, including all
18 means, in general, a fiber is not bound to a specific thread.[footnote The
19 ["main] fiber on each thread, that is, the fiber on which the thread is
21 creates a dispatcher fiber for each thread [mdash] this cannot migrate
23 fiber that relies on [link thread_local_storage thread-local storage].]
25 Migrating a fiber from a logical CPU with heavy workload to another
28 migrate data between threads. Suppose fiber ['f] is running on logical CPU
30 the physical memory located at ['node0]. Migrating the fiber from ['cpu0] to
36 threads. You cannot migrate a running fiber, nor one that is __blocked__. You
37 cannot migrate a fiber if its [member_link context..is_context] method returns
[all …]
Doverview.qbk15 Each fiber has its own stack.
17 A fiber can save the current execution state, including all registers
22 running fiber decides explicitly when it should yield to allow another fiber to
28 compared to a fiber switch with less than a hundred cycles.
29 A fiber runs on a single thread at any point in time.
35 #include <boost/fiber/all.hpp>
47 a given moment, on a given thread, at most one fiber is running.
53 On the other hand, a fiber may safely access any resource exclusively owned by
56 guaranteed that no other fiber on that thread is concurrently touching that
63 running on a fiber can make what looks like a normal blocking function call.
[all …]
Dscheduling.qbk11 The fibers in a thread are coordinated by a fiber manager. Fibers trade
12 control cooperatively, rather than preemptively: the currently-running fiber
14 manager. Each time a fiber suspends (or yields), the fiber manager consults a
15 scheduler to determine which fiber will run next.
17 __boost_fiber__ provides the fiber manager, but the scheduler is a
26 calls: the fiber manager intercepts and defers such calls. Most
66 steal a ready fiber from another thread running this scheduler.
72 fiber scheduler must implement.
74 #include <boost/fiber/algo/algorithm.hpp>
101 [[Effects:] [Informs the scheduler that fiber `f` is ready to run. Fiber `f`
[all …]
/third_party/boost/boost/context/
Dfiber_winfib.hpp66 LPVOID fiber{ nullptr }; member
81 fiber = ::GetCurrentFiber(); in fiber_activation_record()
83 fiber = ::ConvertThreadToFiber( nullptr); in fiber_activation_record()
86 fiber = ::ConvertThreadToFiber( nullptr); in fiber_activation_record()
87 if ( BOOST_UNLIKELY( nullptr == fiber) ) { in fiber_activation_record()
89 fiber = ::GetCurrentFiber(); in fiber_activation_record()
90 BOOST_ASSERT( nullptr != fiber); in fiber_activation_record()
91 BOOST_ASSERT( reinterpret_cast< LPVOID >( 0x1E00) != fiber); in fiber_activation_record()
105 ::DeleteFiber( fiber); in ~fiber_activation_record()
123 ::SwitchToFiber( fiber); in resume()
[all …]
Dfiber_fcontext.hpp201 class fiber { class
211 friend fiber
215 friend fiber
220 fiber( detail::fcontext_t fctx) noexcept : in fiber() function in boost::context::fiber
225 fiber() noexcept = default;
227 template< typename Fn, typename = detail::disable_overload< fiber, Fn > >
228 fiber( Fn && fn) : in fiber() function in boost::context::fiber
229 fiber{ std::allocator_arg, fixedsize_stack(), std::forward< Fn >( fn) } { in fiber()
233 fiber( std::allocator_arg_t, StackAlloc && salloc, Fn && fn) : in fiber() function in boost::context::fiber
234 fctx_{ detail::create_fiber1< detail::fiber_record< fiber, StackAlloc, Fn > >( in fiber()
[all …]
Dfiber_ucontext.hpp358 class BOOST_CONTEXT_DECL fiber { class
372 friend fiber
376 friend fiber
381 fiber( detail::fiber_activation_record * ptr) noexcept : in fiber() function in boost::context::fiber
386 fiber() = default;
388 template< typename Fn, typename = detail::disable_overload< fiber, Fn > >
389 fiber( Fn && fn) : in fiber() function in boost::context::fiber
390 fiber{ in fiber()
401 fiber( std::allocator_arg_t, StackAlloc && salloc, Fn && fn) : in fiber() function in boost::context::fiber
402 ptr_{ detail::create_fiber1< fiber >( in fiber()
[all …]
/third_party/boost/libs/context/doc/
Dfiber.qbk20 registers represent a fiber of the executed program at a given point in time.
23 fiber, e.g. the content of all registers.
28 __fib__ captures the current fiber (the rest of the computation; code after
31 by the calling convention of the ABI, of the current fiber and restoring those
32 registers of the resumed fiber. The control flow of the resumed fiber continues.
33 The current fiber is suspended and passed as argument to the resumed fiber.
35 __fib__ expects a __context_fn__ with signature `'fiber(fiber && f)'`. The
36 parameter `f` represents the current fiber from which this fiber was resumed
39 On return the __context_fn__ of the current fiber has to specify an __fib__ to
41 fiber.
[all …]
/third_party/boost/libs/context/test/
Dtest_fiber.cpp50 ctx::fiber foo( ctx::fiber && f, int i) { in foo()
109 ctx::fiber f;
110 my_exception( ctx::fiber && f_, char const* what) : in my_exception()
134 ctx::fiber f1{ in test_move()
135 [&i](ctx::fiber && f) { in test_move()
144 ctx::fiber f2; in test_move()
159 ctx::fiber f{ std::bind( & X::foo, x, std::placeholders::_1, 7) }; in test_bind()
167 ctx::fiber f{ in test_exception()
168 [&what](ctx::fiber && f) { in test_exception()
184 ctx::fiber f{ [&catched](ctx::fiber && f){ in test_exception()
[all …]
/third_party/boost/libs/context/example/callcc/
Dcircle.cpp16 ctx::fiber f1, f2, f3; in main()
17 f3 = ctx::fiber{[&](ctx::fiber && f)->ctx::fiber{ in main()
25 f2 = ctx::fiber{[&](ctx::fiber && f)->ctx::fiber{ in main()
33 f1 = ctx::fiber{[&](ctx::fiber && /*main*/)->ctx::fiber{ in main() argument
/third_party/boost/libs/context/example/fiber/
Dcircle.cpp16 ctx::fiber f1, f2, f3; in main()
17 f3 = ctx::fiber{[&](ctx::fiber && f)->ctx::fiber{ in main()
25 f2 = ctx::fiber{[&](ctx::fiber && f)->ctx::fiber{ in main()
33 f1 = ctx::fiber{[&](ctx::fiber && /*main*/)->ctx::fiber{ in main() argument
Dthrow.cpp18 ctx::fiber f;
19 my_exception( ctx::fiber && f_, std::string const& what) : in my_exception()
26 ctx::fiber f{[](ctx::fiber && f) ->ctx::fiber { in main()
37 f = std::move( f).resume_with([](ctx::fiber && f) ->ctx::fiber { in main()
/third_party/boost/libs/fiber/test/
Dtest_fss_post.cpp52 boost::fibers::fiber f1( boost::fibers::launch::post, fss_fiber); in fss()
53 boost::fibers::fiber f2( boost::fibers::launch::post, fss_fiber); in fss()
54 boost::fibers::fiber f3( boost::fibers::launch::post, fss_fiber); in fss()
55 boost::fibers::fiber f4( boost::fibers::launch::post, fss_fiber); in fss()
56 boost::fibers::fiber f5( boost::fibers::launch::post, fss_fiber); in fss()
74 boost::fibers::fiber( boost::fibers::launch::post, fss).join(); in test_fss()
94 boost::fibers::fiber f( boost::fibers::launch::post, fss_fiber_with_custom_cleanup); in fss_with_custom_cleanup()
106 boost::fibers::fiber( boost::fibers::launch::post, fss_with_custom_cleanup).join(); in test_fss_with_custom_cleanup()
118 boost::fibers::fiber f( boost::fibers::launch::post, fss_fiber_with_custom_cleanup_and_release); in do_test_fss_does_no_cleanup_after_release()
150 boost::fibers::fiber f( boost::fibers::launch::post, [&delete_tracker](){ in do_test_fss_does_no_cleanup_with_null_cleanup_function()
[all …]
Dtest_fss_dispatch.cpp52 boost::fibers::fiber f1( boost::fibers::launch::dispatch, fss_fiber); in fss()
53 boost::fibers::fiber f2( boost::fibers::launch::dispatch, fss_fiber); in fss()
54 boost::fibers::fiber f3( boost::fibers::launch::dispatch, fss_fiber); in fss()
55 boost::fibers::fiber f4( boost::fibers::launch::dispatch, fss_fiber); in fss()
56 boost::fibers::fiber f5( boost::fibers::launch::dispatch, fss_fiber); in fss()
74 boost::fibers::fiber( boost::fibers::launch::dispatch, fss).join(); in test_fss()
94 boost::fibers::fiber f( boost::fibers::launch::dispatch, fss_fiber_with_custom_cleanup); in fss_with_custom_cleanup()
106 boost::fibers::fiber( boost::fibers::launch::dispatch, fss_with_custom_cleanup).join(); in test_fss_with_custom_cleanup()
118 …boost::fibers::fiber f( boost::fibers::launch::dispatch, fss_fiber_with_custom_cleanup_and_release… in do_test_fss_does_no_cleanup_after_release()
150 boost::fibers::fiber f( boost::fibers::launch::dispatch, [&delete_tracker](){ in do_test_fss_does_no_cleanup_with_null_cleanup_function()
[all …]
Dtest_fiber_dispatch.cpp149 boost::fibers::fiber f( boost::fibers::launch::dispatch, fn4); in fn5()
164 boost::fibers::fiber f( boost::fibers::launch::dispatch, fn1); in test_join_fn()
171 boost::fibers::fiber f( boost::fibers::launch::dispatch, fn2, 3, "abc"); in test_join_fn()
181 boost::fibers::fiber( boost::fibers::launch::dispatch, & X::foo, & x, 3).join(); in test_join_memfn()
190 boost::fibers::fiber f( boost::fibers::launch::dispatch, cp); in test_join_copyable()
201 boost::fibers::fiber f( boost::fibers::launch::dispatch, std::move( mv) ); in test_join_moveable()
213 boost::fibers::fiber f( in test_join_lambda()
227 boost::fibers::fiber f( in test_join_lambda()
245 boost::fibers::fiber f( in test_join_bind()
260 boost::fibers::fiber f( in test_join_bind()
[all …]
Dtest_fiber_post.cpp149 boost::fibers::fiber f( boost::fibers::launch::post, fn4); in fn5()
164 boost::fibers::fiber f( boost::fibers::launch::post, fn1); in test_join_fn()
171 boost::fibers::fiber f( boost::fibers::launch::post, fn2, 3, "abc"); in test_join_fn()
181 boost::fibers::fiber( boost::fibers::launch::post, & X::foo, & x, 3).join(); in test_join_memfn()
190 boost::fibers::fiber f( boost::fibers::launch::post, cp); in test_join_copyable()
201 boost::fibers::fiber f( boost::fibers::launch::post, std::move( mv) ); in test_join_moveable()
213 boost::fibers::fiber f( in test_join_lambda()
227 boost::fibers::fiber f( in test_join_lambda()
245 boost::fibers::fiber f( in test_join_bind()
260 boost::fibers::fiber f( in test_join_bind()
[all …]
Dtest_condition_variable_post.cpp88 boost::fibers::fiber f1( in test_one_waiter_notify_one()
95 boost::fibers::fiber f2( in test_one_waiter_notify_one()
113 boost::fibers::fiber f1( in test_two_waiter_notify_one()
120 boost::fibers::fiber f2( in test_two_waiter_notify_one()
127 boost::fibers::fiber f3( in test_two_waiter_notify_one()
133 boost::fibers::fiber f4( in test_two_waiter_notify_one()
152 boost::fibers::fiber f1( in test_two_waiter_notify_all()
159 boost::fibers::fiber f2( in test_two_waiter_notify_all()
166 boost::fibers::fiber f3( in test_two_waiter_notify_all()
172 boost::fibers::fiber f4( in test_two_waiter_notify_all()
[all …]
/third_party/skia/third_party/externals/swiftshader/third_party/marl/src/
Dscheduler.cpp315 auto fiber = it->fiber; in take() local
317 auto deleted = fibers.erase(fiber) != 0; in take()
320 return fiber; in take()
329 void Scheduler::WaitingFibers::add(const TimePoint& timeout, Fiber* fiber) { in add() argument
330 timeouts.emplace(Timeout{timeout, fiber}); in add()
331 bool added = fibers.emplace(fiber, timeout).second; in add()
336 void Scheduler::WaitingFibers::erase(Fiber* fiber) { in erase() argument
337 auto it = fibers.find(fiber); in erase()
340 auto erased = timeouts.erase(Timeout{timeout, fiber}) != 0; in erase()
347 bool Scheduler::WaitingFibers::contains(Fiber* fiber) const { in contains()
[all …]
Dosfiber_windows.h49 LPVOID fiber = nullptr; variable
55 if (fiber != nullptr) { in ~OSFiber()
59 DeleteFiber(fiber); in ~OSFiber()
67 out->fiber = ConvertThreadToFiberEx(nullptr, FIBER_FLAG_FLOAT_SWITCH); in createFiberFromCurrentThread()
69 MARL_ASSERT(out->fiber != nullptr, in createFiberFromCurrentThread()
82 out->fiber = CreateFiberEx(stackSize - 1, stackSize, FIBER_FLAG_FLOAT_SWITCH, in createFiber()
85 MARL_ASSERT(out->fiber != nullptr, "CreateFiberEx() failed with error 0x%x", in createFiber()
91 SwitchToFiber(to->fiber); in switchTo()
/third_party/boost/libs/fiber/examples/
Dpriority.cpp222 boost::fibers::fiber launch( Fn && func, std::string const& name, int priority) { in launch()
223 boost::fibers::fiber fiber( func); in launch() local
224 priority_props & props( fiber.properties< priority_props >() ); in launch()
227 return fiber; in launch()
250 void change_fn( boost::fibers::fiber & other, in change_fn()
294 boost::fibers::fiber low( launch( yield_fn, "low", 1) ); in main()
295 boost::fibers::fiber med( launch( yield_fn, "medium", 2) ); in main()
296 boost::fibers::fiber hi( launch( yield_fn, "high", 3) ); in main()
308 boost::fibers::fiber a( launch( yield_fn, "a", 0) ); in main()
309 boost::fibers::fiber b( launch( yield_fn, "b", 0) ); in main()
[all …]
/third_party/boost/libs/fiber/
DREADME.md1 Boost.fiber
5 Boost.fiber provides a framework for micro-/userland-threads (fibers) scheduled cooperatively. The …
7fiber is able to store the current execution state, including all registers and CPU flags, the ins…
9 …usually thousands of CPU cycles on x86 compared to a fiber switch with less than 100 cycles. A fib…
11 Boost.fiber requires C++11!

1234567