4.115
Last change
on this file since f58ef8ae was
69f2a07,
checked in by Sebastian Huber <sebastian.huber@…>, on 08/24/10 at 14:29:55
|
2010-08-24 Sebastian Huber <sebastian.huber@…>
PR 1673/cpukit
- sapi/src/chainappendnotify.c, sapi/src/chaingetnotify.c,
sapi/src/chaingetwait.c, sapi/src/chainprependnotify.c: New files.
- sapi/Makefile.am: Reflect changes above.
- sapi/include/rtems/chain.h: Declare
rtems_chain_append_with_notification(),
rtems_chain_prepend_with_notification(),
rtems_chain_get_with_notification(), and rtems_chain_get_with_wait().
- sapi/inline/rtems/chain.inl: Define
rtems_chain_append_with_empty_check(),
rtems_chain_prepend_with_empty_check(), and
rtems_chain_get_with_empty_check().
|
-
Property mode set to
100644
|
File size:
891 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @ingroup ClassicChains |
---|
5 | * |
---|
6 | * @brief rtems_chain_prepend_with_notification() implementation. |
---|
7 | */ |
---|
8 | |
---|
9 | /* |
---|
10 | * Copyright (c) 2010 embedded brains GmbH. All rights reserved. |
---|
11 | * |
---|
12 | * embedded brains GmbH |
---|
13 | * Obere Lagerstr. 30 |
---|
14 | * 82178 Puchheim |
---|
15 | * Germany |
---|
16 | * <rtems@embedded-brains.de> |
---|
17 | * |
---|
18 | * The license and distribution terms for this file may be |
---|
19 | * found in the file LICENSE in this distribution or at |
---|
20 | * http://www.rtems.com/license/LICENSE. |
---|
21 | */ |
---|
22 | |
---|
23 | #if HAVE_CONFIG_H |
---|
24 | #include "config.h" |
---|
25 | #endif |
---|
26 | |
---|
27 | #include <rtems/chain.h> |
---|
28 | |
---|
29 | rtems_status_code rtems_chain_prepend_with_notification( |
---|
30 | rtems_chain_control *chain, |
---|
31 | rtems_chain_node *node, |
---|
32 | rtems_id task, |
---|
33 | rtems_event_set events |
---|
34 | ) |
---|
35 | { |
---|
36 | rtems_status_code sc = RTEMS_SUCCESSFUL; |
---|
37 | bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); |
---|
38 | |
---|
39 | if (was_empty) { |
---|
40 | sc = rtems_event_send( task, events ); |
---|
41 | } |
---|
42 | |
---|
43 | return sc; |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.