diff packages/kernel/current/src/sync/mutex.cxx @ 177:4c750ce71ae3

Merge from eCos master repository on 2001-08-10-19:22:57-BST
author jlarmour
date Fri, 10 Aug 2001 19:27:55 +0000
parents 0ec04793409a
children d61da071934c
line wrap: on
line diff
--- a/packages/kernel/current/src/sync/mutex.cxx
+++ b/packages/kernel/current/src/sync/mutex.cxx
@@ -467,6 +467,28 @@ void Cyg_Mutex::set_ceiling( cyg_priorit
 
 #endif
 
+// -------------------------------------------------------------------------
+// Set priority inversion protocol
+
+#ifdef CYGSEM_KERNEL_SYNCH_MUTEX_PRIORITY_INVERSION_PROTOCOL_DYNAMIC
+void Cyg_Mutex::set_protocol( cyg_protcol new_protocol )
+{
+    CYG_REPORT_FUNCTION();
+
+    // Prevent preemption
+    Cyg_Scheduler::lock();
+    
+    protocol = new_protocol;
+    
+    // Unlock the scheduler
+    Cyg_Scheduler::unlock();
+    
+    CYG_REPORT_RETURN();    
+}
+
+#endif
+
+
 //==========================================================================
 // Condition variables