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.
This commit is contained in:
Joel Sherrill
2007-12-20 21:51:23 +00:00
parent 6bd316209b
commit 23a0607ef1
4 changed files with 39 additions and 1 deletions
+6
View File
@@ -1,3 +1,9 @@
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.
2007-12-20 Jennifer Averett <jennifer.averett@OARcorp.com>
* posix/Makefile.am, posix/src/kill.c, posix/src/killinfo.c: Split file
+1 -1
View File
@@ -58,7 +58,7 @@ librtems_a_SOURCES = src/rtemsobjectgetname.c
librtems_a_SOURCES += src/tasks.c src/taskcreate.c src/taskdelete.c \
src/taskgetnote.c src/taskident.c src/taskinitusers.c \
src/taskissuspended.c src/taskmode.c src/taskrestart.c src/taskresume.c \
src/tasksetnote.c src/tasksetpriority.c src/taskstart.c \
src/taskself.c src/tasksetnote.c src/tasksetpriority.c src/taskstart.c \
src/tasksuspend.c src/taskwakeafter.c src/taskwakewhen.c \
src/taskvariableadd.c src/taskvariabledelete.c src/taskvariableget.c \
src/taskvariable_invoke_dtor.c src/taskdata.c
+8
View File
@@ -436,6 +436,14 @@ rtems_status_code rtems_task_variable_delete(
void **ptr
);
/*
* rtems_task_self
*
* This directive returns the ID of the currently executing task.
*/
rtems_id rtems_task_self(void);
/*
* _RTEMS_tasks_Initialize_user_tasks
*
+24
View File
@@ -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;
}