diff options
Merge branch 'master' of brain.opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs b/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs index 6acc293..e1f8c4c 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs | |||
@@ -1535,15 +1535,38 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
1535 | */ | 1535 | */ |
1536 | public void QueueToStart(XMRInstance inst) | 1536 | public void QueueToStart(XMRInstance inst) |
1537 | { | 1537 | { |
1538 | if(inst.m_IState != XMRInstState.ONSTARTQ) | 1538 | if (inst.m_IState != XMRInstState.ONSTARTQ) |
1539 | throw new Exception("bad state"); | 1539 | throw new Exception("bad state"); |
1540 | 1540 | ||
1541 | lock(m_StartQueue) | 1541 | lock (m_StartQueue) |
1542 | m_StartQueue.InsertTail(inst); | 1542 | m_StartQueue.InsertTail(inst); |
1543 | 1543 | ||
1544 | WakeUpOne(); | 1544 | WakeUpOne(); |
1545 | } | 1545 | } |
1546 | 1546 | ||
1547 | public void QueueToYield(XMRInstance inst) | ||
1548 | { | ||
1549 | if (inst.m_IState != XMRInstState.ONYIELDQ) | ||
1550 | throw new Exception("bad state"); | ||
1551 | |||
1552 | lock (m_YieldQueue) | ||
1553 | m_YieldQueue.InsertTail(inst); | ||
1554 | |||
1555 | WakeUpOne(); | ||
1556 | } | ||
1557 | |||
1558 | public void RemoveFromSleep(XMRInstance inst) | ||
1559 | { | ||
1560 | lock (m_SleepQueue) | ||
1561 | { | ||
1562 | if (inst.m_IState != XMRInstState.ONSLEEPQ) | ||
1563 | return; | ||
1564 | |||
1565 | m_SleepQueue.Remove(inst); | ||
1566 | inst.m_IState = XMRInstState.REMDFROMSLPQ; | ||
1567 | } | ||
1568 | } | ||
1569 | |||
1547 | /** | 1570 | /** |
1548 | * @brief A script may be sleeping, in which case we wake it. | 1571 | * @brief A script may be sleeping, in which case we wake it. |
1549 | */ | 1572 | */ |