rtems-task-variable-add.c 658 B

12345678910111213141516171819202122232425
  1. /* rtems-task-variable-add.c -- adding a task specific variable in RTEMS OS.
  2. Copyright 2010 The Go Authors. All rights reserved.
  3. Use of this source code is governed by a BSD-style
  4. license that can be found in the LICENSE file. */
  5. #include <rtems/error.h>
  6. #include <rtems/system.h>
  7. #include <rtems/rtems/tasks.h>
  8. #include "go-assert.h"
  9. /* RTEMS does not support GNU TLS extension __thread. */
  10. void
  11. __wrap_rtems_task_variable_add (void **var)
  12. {
  13. rtems_status_code sc = rtems_task_variable_add (RTEMS_SELF, var, NULL);
  14. if (sc != RTEMS_SUCCESSFUL)
  15. {
  16. rtems_error (sc, "rtems_task_variable_add failed");
  17. __go_assert (0);
  18. }
  19. }