diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-20 21:51:23 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-20 21:51:23 +0000 |
commit | 23a0607ef1a3f210734f79c72bebb6c595bb7e4e (patch) | |
tree | 9e65b2f1ee9e62a57f9839244daaa0d5102adb33 /cpukit/rtems/src/taskself.c | |
parent | 2007-12-20 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-23a0607ef1a3f210734f79c72bebb6c595bb7e4e.tar.bz2 |
2007-12-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/Makefile.am, rtems/include/rtems/rtems/tasks.h: Add
rtems_task_self() directive.
* rtems/src/taskself.c: New file.
Diffstat (limited to 'cpukit/rtems/src/taskself.c')
-rw-r--r-- | cpukit/rtems/src/taskself.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cpukit/rtems/src/taskself.c b/cpukit/rtems/src/taskself.c new file mode 100644 index 0000000000..e596c15c60 --- /dev/null +++ b/cpukit/rtems/src/taskself.c @@ -0,0 +1,24 @@ +/* + * RTEMS Task Manager - Get ID of Self + * + * COPYRIGHT (c) 1989-2007. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include <rtems/system.h> +#include <rtems/rtems/tasks.h> + +rtems_id rtems_task_self(void) +{ + return _Thread_Executing->Object.id; +} |