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