RTEMS
cpukit
rtems
src
ratemondelete.c
Go to the documentation of this file.
1
8
/*
9
* COPYRIGHT (c) 1989-2007.
10
* On-Line Applications Research Corporation (OAR).
11
* Copyright (c) 2016 embedded brains GmbH.
12
*
13
* The license and distribution terms for this file may be
14
* found in the file LICENSE in this distribution or at
15
* http://www.rtems.org/license/LICENSE.
16
*/
17
18
#ifdef HAVE_CONFIG_H
19
#include "config.h"
20
#endif
21
22
#include <
rtems/rtems/ratemonimpl.h
>
23
24
rtems_status_code
rtems_rate_monotonic_delete
(
25
rtems_id
id
26
)
27
{
28
Rate_monotonic_Control
*the_period;
29
ISR_lock_Context
lock_context;
30
rtems_status_code
status;
31
32
_Objects_Allocator_lock
();
33
34
the_period = _Rate_monotonic_Get(
id
, &lock_context );
35
if
( the_period != NULL ) {
36
_Objects_Close
( &
_Rate_monotonic_Information
, &the_period->
Object
);
37
_Rate_monotonic_Cancel( the_period, the_period->
owner
, &lock_context );
38
_Objects_Free
( &
_Rate_monotonic_Information
, &the_period->
Object
);
39
status =
RTEMS_SUCCESSFUL
;
40
}
else
{
41
status =
RTEMS_INVALID_ID
;
42
}
43
44
_Objects_Allocator_unlock
();
45
46
return
status;
47
}
_Objects_Allocator_unlock
static __inline__ void _Objects_Allocator_unlock(void)
Unlocks the object allocator mutex.
Definition:
objectimpl.h:846
Rate_monotonic_Control::Object
Objects_Control Object
Definition:
ratemondata.h:71
_Rate_monotonic_Information
Objects_Information _Rate_monotonic_Information
The Classic Rate Monotonic objects information.
Definition:
ratemon.c:47
rtems_rate_monotonic_delete
rtems_status_code rtems_rate_monotonic_delete(rtems_id id)
%
Definition:
ratemondelete.c:24
Rate_monotonic_Control::owner
Thread_Control * owner
Definition:
ratemondata.h:100
_Objects_Allocator_lock
static __inline__ void _Objects_Allocator_lock(void)
Locks the object allocator mutex.
Definition:
objectimpl.h:834
RTEMS_SUCCESSFUL
This status code indicates successful completion.
Definition:
status.h:86
rtems_status_code
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition:
status.h:82
Rate_monotonic_Control
The following structure defines the control block used to manage each period.
Definition:
ratemondata.h:69
RTEMS_INVALID_ID
This status code indicates that an object identifier was invalid.
Definition:
status.h:106
rtems_id
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition:
types.h:99
ratemonimpl.h
Classic Rate Monotonic Scheduler Implementation.
ISR_lock_Context
Local ISR lock context for acquire and release pairs.
Definition:
isrlock.h:65
_Objects_Close
void _Objects_Close(const Objects_Information *information, Objects_Control *the_object)
Closes object.
Definition:
objectclose.c:23
_Objects_Free
static __inline__ void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition:
objectimpl.h:933
Generated by
1.8.14