mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-31 06:18:42 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user