Index: c/src/tests/sptests/Makefile.am
===================================================================
--- c/src/tests/sptests/Makefile.am	(revision 713b2eac2fdb0a40056ddb8eb00250541df0a3b2)
+++ c/src/tests/sptests/Makefile.am	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -16,5 +16,5 @@
 ## sp10 and spfatal are not included for now
 SUBDIRS = . sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
-    sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 spsize
+    sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 spsize
 
 include $(top_srcdir)/../../../../automake/subdirs.am
Index: c/src/tests/sptests/configure.in
===================================================================
--- c/src/tests/sptests/configure.in	(revision 713b2eac2fdb0a40056ddb8eb00250541df0a3b2)
+++ c/src/tests/sptests/configure.in	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -66,4 +66,5 @@
 sp26/Makefile
 sp27/Makefile
+sp28/Makefile
 spsize/Makefile
 )
Index: c/src/tests/sptests/sp28/Makefile.in
===================================================================
--- c/src/tests/sptests/sp28/Makefile.in	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
+++ c/src/tests/sptests/sp28/Makefile.in	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -0,0 +1,81 @@
+#
+#  $Id$
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = ..
+subdir = sp28
+
+RTEMS_ROOT = @RTEMS_ROOT@
+PROJECT_ROOT = @PROJECT_ROOT@
+
+VPATH = @srcdir@
+
+TEST = sp28
+
+MANAGERS = all
+
+# C source names, if any, go here -- minus the .c
+C_PIECES = init 
+C_FILES = $(C_PIECES:%=%.c)
+C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
+
+H_FILES = 
+
+DOCTYPES = scn doc
+DOCS = $(DOCTYPES:%=$(TEST).%)
+
+SRCS = $(DOCS) $(C_FILES) $(H_FILES)
+OBJS = $(C_O_FILES)
+
+PRINT_SRCS = $(DOCS)
+
+PGM = ${ARCH}/$(TEST).exe
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+INSTALL_CHANGE = @INSTALL_CHANGE@
+PACKHEX = @PACKHEX@
+mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
+
+INSTALLDIRS = $(PROJECT_RELEASE)/tests/screens/sptests
+
+$(INSTALLDIRS):
+	@$(mkinstalldirs) $(INSTALLDIRS)
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+DEFINES +=
+CPPFLAGS +=
+CFLAGS +=
+
+LD_PATHS +=
+LD_LIBS +=
+LDFLAGS +=
+
+#
+# Add your list of files to delete here.  The config files
+#  already know how to delete some stuff, so you may want
+#  to just run 'make clean' first to see what gets missed.
+#  'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS +=
+CLOBBER_ADDITIONS +=
+
+all: ${ARCH} $(SRCS) $(PGM)
+	$(INSTALL_VARIANT) -m 755 ${PGM} $(PROJECT_RELEASE)/tests
+	$(INSTALL_CHANGE) $(srcdir)/$(TEST).scn \
+	    $(PROJECT_RELEASE)/tests/screens/sptests/$(TEST).scn
+
+${PGM}: $(OBJS) $(LINK_FILES)
+	$(make-exe)
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	cd $(top_builddir) \
+	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
Index: c/src/tests/sptests/sp28/init.c
===================================================================
--- c/src/tests/sptests/sp28/init.c	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
+++ c/src/tests/sptests/sp28/init.c	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -0,0 +1,96 @@
+#define TEST_INIT
+#include <tmacros.h>
+
+rtems_task Init(rtems_task_argument argument);
+
+#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_MAXIMUM_USER_EXTENSIONS    2
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_MICROSECONDS_PER_TICK       52429
+
+#define CONFIGURE_MICROSECONDS_INIT
+
+#include <confdefs.h>
+
+#include <bsp.h>
+#include <rtems/error.h>
+#include <rtems/rtems/task_variable.h>
+#include <stdio.h>
+
+volatile int taskvar;
+
+rtems_task
+subtask (rtems_task_argument arg)
+{
+	int localvar = arg;
+	int i;
+	rtems_status_code sc;
+
+	sc = rtems_task_variable_add (RTEMS_SELF, (void *) &taskvar);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't add task variable: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+	taskvar = localvar;
+	while (localvar < 1000) {
+		localvar++;
+		rtems_task_wake_after (0);
+		taskvar++;
+		rtems_task_wake_after (0);
+		if (taskvar != localvar) {
+			printf ("Task:%d taskvar:%d localvar:%d\n", arg, taskvar, localvar);
+			rtems_task_suspend (RTEMS_SELF);
+		}
+	}
+	sc = rtems_task_variable_delete (RTEMS_SELF, (void *) &taskvar);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't delete task variable: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+	for (i = 0 ; ; i++) {
+		taskvar = localvar = 100 * arg;
+		rtems_task_wake_after (0);
+		if (taskvar == localvar) {
+			printf ("Task:%d taskvar:%d localvar:%d\n", arg, taskvar, localvar);
+			rtems_task_suspend (RTEMS_SELF);
+		}
+		if ((arg == 3) && (i == 100)) {
+			printf ("Task variables test succeeded.\n");
+			exit (0);
+		}
+	}
+}
+
+void
+starttask (int arg)
+{
+	rtems_id tid;
+	rtems_status_code sc;
+
+	sc = rtems_task_create (rtems_build_name ('S', 'R', 'V', arg + 'A'),
+		100,
+		10000,
+		RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
+		RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
+		&tid);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't create task: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+	sc = rtems_task_start (tid, subtask, arg);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't start task: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+}
+
+rtems_task
+Init (rtems_task_argument ignored)
+{
+	starttask (1);
+	starttask (2);
+	starttask (3);
+	rtems_task_suspend (RTEMS_SELF);
+}
Index: c/src/tests/sptests/sp28/sp28.scn
===================================================================
--- c/src/tests/sptests/sp28/sp28.scn	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
+++ c/src/tests/sptests/sp28/sp28.scn	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -0,0 +1,1 @@
+Task variables test succeeded.
Index: testsuites/sptests/Makefile.am
===================================================================
--- testsuites/sptests/Makefile.am	(revision 713b2eac2fdb0a40056ddb8eb00250541df0a3b2)
+++ testsuites/sptests/Makefile.am	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -16,5 +16,5 @@
 ## sp10 and spfatal are not included for now
 SUBDIRS = . sp01 sp02 sp03 sp04 sp05 sp06 sp07 sp08 sp09 sp11 sp12 sp13 sp14 \
-    sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 spsize
+    sp15 sp16 sp17 sp19 sp20 sp21 sp22 sp23 sp24 sp25 sp26 sp27 sp28 spsize
 
 include $(top_srcdir)/../../../../automake/subdirs.am
Index: testsuites/sptests/sp28/init.c
===================================================================
--- testsuites/sptests/sp28/init.c	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
+++ testsuites/sptests/sp28/init.c	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -0,0 +1,96 @@
+#define TEST_INIT
+#include <tmacros.h>
+
+rtems_task Init(rtems_task_argument argument);
+
+#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
+#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_MAXIMUM_USER_EXTENSIONS    2
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+#define CONFIGURE_MICROSECONDS_PER_TICK       52429
+
+#define CONFIGURE_MICROSECONDS_INIT
+
+#include <confdefs.h>
+
+#include <bsp.h>
+#include <rtems/error.h>
+#include <rtems/rtems/task_variable.h>
+#include <stdio.h>
+
+volatile int taskvar;
+
+rtems_task
+subtask (rtems_task_argument arg)
+{
+	int localvar = arg;
+	int i;
+	rtems_status_code sc;
+
+	sc = rtems_task_variable_add (RTEMS_SELF, (void *) &taskvar);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't add task variable: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+	taskvar = localvar;
+	while (localvar < 1000) {
+		localvar++;
+		rtems_task_wake_after (0);
+		taskvar++;
+		rtems_task_wake_after (0);
+		if (taskvar != localvar) {
+			printf ("Task:%d taskvar:%d localvar:%d\n", arg, taskvar, localvar);
+			rtems_task_suspend (RTEMS_SELF);
+		}
+	}
+	sc = rtems_task_variable_delete (RTEMS_SELF, (void *) &taskvar);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't delete task variable: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+	for (i = 0 ; ; i++) {
+		taskvar = localvar = 100 * arg;
+		rtems_task_wake_after (0);
+		if (taskvar == localvar) {
+			printf ("Task:%d taskvar:%d localvar:%d\n", arg, taskvar, localvar);
+			rtems_task_suspend (RTEMS_SELF);
+		}
+		if ((arg == 3) && (i == 100)) {
+			printf ("Task variables test succeeded.\n");
+			exit (0);
+		}
+	}
+}
+
+void
+starttask (int arg)
+{
+	rtems_id tid;
+	rtems_status_code sc;
+
+	sc = rtems_task_create (rtems_build_name ('S', 'R', 'V', arg + 'A'),
+		100,
+		10000,
+		RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0),
+		RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL,
+		&tid);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't create task: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+	sc = rtems_task_start (tid, subtask, arg);
+	if (sc != RTEMS_SUCCESSFUL) {
+		printf ("Can't start task: %s\n", rtems_status_text (sc));
+		rtems_task_suspend (RTEMS_SELF);
+	}
+}
+
+rtems_task
+Init (rtems_task_argument ignored)
+{
+	starttask (1);
+	starttask (2);
+	starttask (3);
+	rtems_task_suspend (RTEMS_SELF);
+}
Index: testsuites/sptests/sp28/sp28.scn
===================================================================
--- testsuites/sptests/sp28/sp28.scn	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
+++ testsuites/sptests/sp28/sp28.scn	(revision 458d4e665242aea069946b7caabc3088d61c61a3)
@@ -0,0 +1,1 @@
+Task variables test succeeded.
