blob: 3dfd0b4bc1646fef34d30099f06991533cd82769 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
SPDX-License-Identifier: CC-BY-SA-4.0 OR BSD-2-Clause
brief: |
Deletes the calling task.
copyrights:
- Copyright (C) 2021 embedded brains GmbH & Co. KG
- Copyright (C) 1988, 2017 On-Line Applications Research Corporation (OAR)
definition:
default:
attributes: ${../../basedefs/if/no-return:/name}
body: null
params: []
return: void
variants: []
description: |
This directive deletes the calling task.
enabled-by: true
index-entries:
- deleting a task
interface-type: function
links:
- role: interface-placement
uid: header
- role: interface-ingroup
uid: group
- role: constraint
uid: /constraint/directive-ctx-task
- role: constraint
uid: /constraint/directive-no-return
- role: constraint
uid: /constraint/fatal-bad-thread-dispatch-disable-level
name: rtems_task_exit
notes: |
The directive is an optimized variant of the following code sequences, see
also ${delete:/name}:
.. code-block:: c
#include <pthread.h>
#include <rtems.h>
void classic_delete_self( void )
{
(void) rtems_task_delete( RTEMS_SELF );
}
void posix_delete_self( void )
{
(void) pthread_detach( pthread_self() );
(void) pthread_exit( NULL);
}
params: []
return: null
type: interface
|