Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change order of execution of delegates from FILO to FIFO #623

Merged
merged 1 commit into from
Feb 18, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions bfvmm/include/vcpu/vcpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class EXPORT_VCPU vcpu
/// Add Run Delegate
///
/// Adds a run delegate to the VCPU. The delegates are added to a queue and
/// executed in FILO order. All delegates are executed unless an exception
/// executed in FIFO order. All delegates are executed unless an exception
/// is thrown that is not handled.
///
/// @expects none
Expand All @@ -269,12 +269,12 @@ class EXPORT_VCPU vcpu
/// @param d the delegate to add to the vcpu
///
VIRTUAL void add_run_delegate(run_delegate_t &&d) noexcept
{ m_run_delegates.push_back(std::move(d)); }
{ m_run_delegates.push_front(std::move(d)); }

/// Add Halt Delegate
///
/// Adds a halt delegate to the VCPU. The delegates are added to a queue and
/// executed in FILO order. All delegates are executed unless an exception
/// executed in FIFO order. All delegates are executed unless an exception
/// is thrown that is not handled.
///
/// @expects none
Expand All @@ -283,12 +283,12 @@ class EXPORT_VCPU vcpu
/// @param d the delegate to add to the vcpu
///
VIRTUAL void add_hlt_delegate(hlt_delegate_t &&d) noexcept
{ m_hlt_delegates.push_back(std::move(d)); }
{ m_hlt_delegates.push_front(std::move(d)); }

/// Add Init Delegate
///
/// Adds a init delegate to the VCPU. The delegates are added to a queue and
/// executed in FILO order. All delegates are executed unless an exception
/// executed in FIFO order. All delegates are executed unless an exception
/// is thrown that is not handled.
///
/// @expects none
Expand All @@ -297,12 +297,12 @@ class EXPORT_VCPU vcpu
/// @param d the delegate to add to the vcpu
///
VIRTUAL void add_init_delegate(init_delegate_t &&d) noexcept
{ m_init_delegates.push_back(std::move(d)); }
{ m_init_delegates.push_front(std::move(d)); }

/// Add Fini Delegate
///
/// Adds a fini delegate to the VCPU. The delegates are added to a queue and
/// executed in FILO order. All delegates are executed unless an exception
/// executed in FIFO order. All delegates are executed unless an exception
/// is thrown that is not handled.
///
/// @expects none
Expand All @@ -311,7 +311,7 @@ class EXPORT_VCPU vcpu
/// @param d the delegate to add to the vcpu
///
VIRTUAL void add_fini_delegate(fini_delegate_t &&d) noexcept
{ m_fini_delegates.push_back(std::move(d)); }
{ m_fini_delegates.push_front(std::move(d)); }

private:

Expand Down