summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-04-03 12:55:43 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-04-04 14:27:27 -0500
commitd507c0373168e6375b1e876d79730bff8020cb58 (patch)
tree1ca65b27019e70bdeef2e7d01357cfdbae2a0d5b /cpukit/rtems/include
parentrhealstone/rhmlatency: Fix configuration (diff)
downloadrtems-d507c0373168e6375b1e876d79730bff8020cb58.tar.bz2
Disable per task variables when SMP is enabled
Per task variables are inherently unsafe in SMP systems. This patch disables them from the build and adds warnings in the appropriate documentation and configuration sections.
Diffstat (limited to 'cpukit/rtems/include')
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasks.h14
-rw-r--r--cpukit/rtems/include/rtems/rtems/tasksimpl.h4
2 files changed, 12 insertions, 6 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index 325723ff85..263cc531d9 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -28,7 +28,7 @@
*/
/*
- * COPYRIGHT (c) 1989-2011.
+ * COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -449,17 +449,18 @@ rtems_status_code rtems_task_wake_after(
*
* This directive returns a status indicating whether or not
* the specified task is suspended.
- *
- * RTEMS Task Manager
*/
rtems_status_code rtems_task_is_suspended(
rtems_id id
);
+#if !defined(RTEMS_SMP)
/**
* @brief RTEMS Add Task Variable
*
* This directive adds a per task variable.
+ *
+ * @note This service is not available in SMP configurations.
*/
rtems_status_code rtems_task_variable_add(
rtems_id tid,
@@ -470,9 +471,9 @@ rtems_status_code rtems_task_variable_add(
/**
* @brief Get a per-task variable
*
- * RTEMS Task Variable Get
- *
* This directive gets the value of a task variable.
+ *
+ * @note This service is not available in SMP configurations.
*/
rtems_status_code rtems_task_variable_get(
rtems_id tid,
@@ -484,11 +485,14 @@ rtems_status_code rtems_task_variable_get(
* @brief RTEMS Delete Task Variable
*
* This directive removes a per task variable.
+ *
+ * @note This service is not available in SMP configurations.
*/
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
);
+#endif
#if defined(__RTEMS_HAVE_SYS_CPUSET_H__) && defined(RTEMS_SMP)
/**
diff --git a/cpukit/rtems/include/rtems/rtems/tasksimpl.h b/cpukit/rtems/include/rtems/rtems/tasksimpl.h
index c86d5914c2..280be2fac8 100644
--- a/cpukit/rtems/include/rtems/rtems/tasksimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/tasksimpl.h
@@ -6,7 +6,7 @@
* @brief Classic Tasks Manager Implementation
*/
-/* COPYRIGHT (c) 1989-2008.
+/* COPYRIGHT (c) 1989-2014.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -66,6 +66,7 @@ void _RTEMS_tasks_Manager_initialization(void);
*/
void _RTEMS_tasks_Initialize_user_tasks( void );
+#if !defined(RTEMS_SMP)
/**
* @brief RTEMS Tasks Invoke Task Variable Destructor
*
@@ -76,6 +77,7 @@ void _RTEMS_Tasks_Invoke_task_variable_dtor(
Thread_Control *the_thread,
rtems_task_variable_t *tvp
);
+#endif
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate(void)
{