[rtems commit] monitor: Use object allocator lock

Sebastian Huber sebh at rtems.org
Tue Mar 15 07:13:22 UTC 2016


Module:    rtems
Branch:    master
Commit:    df91dd9f34686567042b055a623ee2db9dbe7ae6
Changeset: http://git.rtems.org/rtems/commit/?id=df91dd9f34686567042b055a623ee2db9dbe7ae6

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar 14 12:31:12 2016 +0100

monitor: Use object allocator lock

Use object allocator lock instead of disabled thread dispatching.

Update #2555.

---

 cpukit/libmisc/monitor/mon-config.c  | 2 +-
 cpukit/libmisc/monitor/mon-driver.c  | 2 +-
 cpukit/libmisc/monitor/mon-itask.c   | 2 +-
 cpukit/libmisc/monitor/mon-mpci.c    | 2 +-
 cpukit/libmisc/monitor/mon-object.c  | 2 +-
 cpukit/libmisc/monitor/mon-symbols.c | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cpukit/libmisc/monitor/mon-config.c b/cpukit/libmisc/monitor/mon-config.c
index a6674c1..f09c7cb 100644
--- a/cpukit/libmisc/monitor/mon-config.c
+++ b/cpukit/libmisc/monitor/mon-config.c
@@ -66,7 +66,7 @@ rtems_monitor_config_next(
     if (n >= 1)
         goto failed;
 
-    _Thread_Disable_dispatch();
+    _Objects_Allocator_lock();
 
     *next_id += 1;
     return (const void *) c;
diff --git a/cpukit/libmisc/monitor/mon-driver.c b/cpukit/libmisc/monitor/mon-driver.c
index 504d509..f10b8c9 100644
--- a/cpukit/libmisc/monitor/mon-driver.c
+++ b/cpukit/libmisc/monitor/mon-driver.c
@@ -69,7 +69,7 @@ rtems_monitor_driver_next(
     if (n >= _IO_Number_of_drivers)
         goto failed;
 
-    _Thread_Disable_dispatch();
+    _Objects_Allocator_lock();
 
     /*
      * dummy up a fake id and name for this item
diff --git a/cpukit/libmisc/monitor/mon-itask.c b/cpukit/libmisc/monitor/mon-itask.c
index d686b41..3910332 100644
--- a/cpukit/libmisc/monitor/mon-itask.c
+++ b/cpukit/libmisc/monitor/mon-itask.c
@@ -46,7 +46,7 @@ rtems_monitor_init_task_next(
     if (n >= Configuration_RTEMS_API.number_of_initialization_tasks)
         goto failed;
 
-    _Thread_Disable_dispatch();
+    _Objects_Allocator_lock();
 
     itask = Configuration_RTEMS_API.User_initialization_tasks_table + n;
 
diff --git a/cpukit/libmisc/monitor/mon-mpci.c b/cpukit/libmisc/monitor/mon-mpci.c
index 14e538d..1ede142 100644
--- a/cpukit/libmisc/monitor/mon-mpci.c
+++ b/cpukit/libmisc/monitor/mon-mpci.c
@@ -79,7 +79,7 @@ rtems_monitor_mpci_next(
     if ( ! c->User_multiprocessing_table)
         goto failed;
 
-    _Thread_Disable_dispatch();
+    _Objects_Allocator_lock();
 
     *next_id += 1;
     return (void *) c;
diff --git a/cpukit/libmisc/monitor/mon-object.c b/cpukit/libmisc/monitor/mon-object.c
index 72e9f1e..ef32214 100644
--- a/cpukit/libmisc/monitor/mon-object.c
+++ b/cpukit/libmisc/monitor/mon-object.c
@@ -262,7 +262,7 @@ rtems_monitor_object_canonical_next(
 
      if (raw_item) {
        info->canonical(canonical, raw_item);
-       _Thread_Enable_dispatch();
+       _Objects_Allocator_unlock();
      }
   }
   return next_id;
diff --git a/cpukit/libmisc/monitor/mon-symbols.c b/cpukit/libmisc/monitor/mon-symbols.c
index 57d3604..d3f0bef 100644
--- a/cpukit/libmisc/monitor/mon-symbols.c
+++ b/cpukit/libmisc/monitor/mon-symbols.c
@@ -318,7 +318,7 @@ rtems_monitor_symbol_next(
     if (table->sorted == 0)
         rtems_symbol_sort(table);
 
-    _Thread_Disable_dispatch();
+    _Objects_Allocator_lock();
 
     *next_id += 1;
     return (const void *) (table->addresses + n);




More information about the vc mailing list