Skip to content

Commit

Permalink
Change order of execution of delegates from FILO to FIFO (#623)
Browse files Browse the repository at this point in the history
Signed-off-by: "Manohar Reddy" <"201451024@iiitvadodara.ac.in">
  • Loading branch information
Manohar Reddy authored and rianquinn committed Feb 18, 2018
1 parent d9bc098 commit 179d71e
Showing 1 changed file with 8 additions and 8 deletions.
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

0 comments on commit 179d71e

Please sign in to comment.