mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-27 13:59:34 +08:00
monitor: Use object allocator lock
Use object allocator lock instead of disabled thread dispatching. Update #2555.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user