Changeset 6a20bd2 in rtems-docs


Ignore:
Timestamp:
Sep 28, 2018, 8:29:49 AM (7 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
304bc2c
Parents:
3e8af71
git-author:
Sebastian Huber <sebastian.huber@…> (09/28/18 08:29:49)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/04/18 09:05:26)
Message:

c-user: Document rtems_task_exit()

Close #3533.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c-user/task_manager.rst

    r3e8af71 r6a20bd2  
    2727
    2828- rtems_task_delete_ - Delete a task
     29
     30- rtems_task_exit_ - Delete the calling task
    2931
    3032- rtems_task_suspend_ - Suspend a task
     
    516518task's name and ID become inactive at this time, and any subsequent references
    517519to either of them is invalid.  In fact, RTEMS may reuse the task ID for another
    518 task which is created later in the application.
     520task which is created later in the application.  A specialization of
     521``rtems_task_delete`` is ``rtems_task_exit`` which deletes the calling task.
    519522
    520523Unexpired delay timers (i.e. those used by ``rtems_task_wake_after`` and
     
    10061009   \clearpage
    10071010
     1011.. index:: deleting a task
     1012.. index:: rtems_task_exit
     1013
     1014.. _rtems_task_exit:
     1015
     1016TASK_EXIT - Delete the calling task
     1017-----------------------------------
     1018
     1019CALLING SEQUENCE:
     1020    .. code-block:: c
     1021
     1022        void rtems_task_exit( void ) RTEMS_NO_RETURN;
     1023
     1024DIRECTIVE STATUS CODES:
     1025    NONE - This function will not return to the caller.
     1026
     1027DESCRIPTION:
     1028    This directive deletes the calling task.
     1029
     1030NOTES:
     1031    This directive must be called from a regular task context with enabled
     1032    interrupts, otherwise one of the fatal errors
     1033
     1034    * :ref:`INTERNAL_ERROR_BAD_THREAD_DISPATCH_DISABLE_LEVEL <internal_errors>`, or
     1035    * :ref:`INTERNAL_ERROR_BAD_THREAD_DISPATCH_ENVIRONMENT <internal_errors>`
     1036
     1037    will occur.
     1038
     1039    The ``rtems_task_exit()`` call is equivalent to the following code
     1040    sequence:
     1041
     1042    .. code-block:: c
     1043
     1044        pthread_detach(pthread_self());
     1045        pthread_exit(NULL);
     1046
     1047    See also :ref:`rtems_task_delete() <rtems_task_delete>`.
     1048
     1049.. raw:: latex
     1050
     1051   \clearpage
     1052
    10081053.. index:: suspending a task
    10091054.. index:: rtems_task_suspend
Note: See TracChangeset for help on using the changeset viewer.