mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-26 20:03:36 +08:00
rtems: Error for task variables on SMP
Task variables are not supported on SMP.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#endif
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
#include <rtems/score/wkspace.h>
|
||||
|
||||
@@ -32,6 +33,12 @@ rtems_status_code rtems_task_variable_add(
|
||||
Objects_Locations location;
|
||||
rtems_task_variable_t *tvp, *new;
|
||||
|
||||
#if defined( RTEMS_SMP )
|
||||
if ( rtems_configuration_is_smp_enabled() ) {
|
||||
return RTEMS_NOT_IMPLEMENTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !ptr )
|
||||
return RTEMS_INVALID_ADDRESS;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#endif
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
#include <rtems/score/wkspace.h>
|
||||
|
||||
@@ -31,6 +32,12 @@ rtems_status_code rtems_task_variable_delete(
|
||||
Objects_Locations location;
|
||||
rtems_task_variable_t *tvp, *prev;
|
||||
|
||||
#if defined( RTEMS_SMP )
|
||||
if ( rtems_configuration_is_smp_enabled() ) {
|
||||
return RTEMS_NOT_IMPLEMENTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !ptr )
|
||||
return RTEMS_INVALID_ADDRESS;
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#endif
|
||||
|
||||
#include <rtems/system.h>
|
||||
#include <rtems/config.h>
|
||||
#include <rtems/rtems/tasks.h>
|
||||
#include <rtems/score/wkspace.h>
|
||||
|
||||
@@ -38,6 +39,12 @@ rtems_status_code rtems_task_variable_get(
|
||||
Objects_Locations location;
|
||||
rtems_task_variable_t *tvp;
|
||||
|
||||
#if defined( RTEMS_SMP )
|
||||
if ( rtems_configuration_is_smp_enabled() ) {
|
||||
return RTEMS_NOT_IMPLEMENTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !ptr )
|
||||
return RTEMS_INVALID_ADDRESS;
|
||||
|
||||
|
||||
@@ -26,6 +26,15 @@ static void test(void)
|
||||
|
||||
sc = rtems_task_delete(RTEMS_SELF);
|
||||
rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
|
||||
|
||||
sc = rtems_task_variable_add(RTEMS_SELF, NULL, NULL);
|
||||
rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
|
||||
|
||||
sc = rtems_task_variable_delete(RTEMS_SELF, NULL);
|
||||
rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
|
||||
|
||||
sc = rtems_task_variable_get(RTEMS_SELF, NULL, NULL);
|
||||
rtems_test_assert(sc == RTEMS_NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
static void Init(rtems_task_argument arg)
|
||||
|
||||
Reference in New Issue
Block a user