Ignore:
Timestamp:
Aug 24, 2010, 2:29:55 PM (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
469e71d
Parents:
b15fb6e
Message:

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().
File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/rtems/chain.h

    rb15fb6e r69f2a07  
    11/**
    2  * @file rtems/chain.h
     2 * @file
    33 *
    4  *  This include file contains all the constants and structures associated
    5  *  with the Chain API in RTEMS. The chain is a double linked list that
    6  *  is part of the Super Core. This is the published interface to that
    7  *  code.
     4 * @ingroup ClassicChains
    85 *
     6 * @brief Chain API.
    97 */
    108
    119/*
     10 *  Copyright (c) 2010 embedded brains GmbH.
     11 *
    1212 *  COPYRIGHT (c) 1989-2008.
    1313 *  On-Line Applications Research Corporation (OAR).
     
    2525#include <rtems/system.h>
    2626#include <rtems/score/chain.h>
     27#include <rtems/rtems/event.h>
    2728
    2829#ifdef __cplusplus
     
    3132
    3233/**
    33  * @typedef rtems_chain_node
     34 * @defgroup ClassicChains Chains
    3435 *
    35  * A node that can be manipulated in the chain.
     36 * @ingroup ClassicRTEMS
     37 *
     38 * @brief Chain API.
     39 *
     40 * @{
    3641 */
     42
    3743typedef Chain_Node rtems_chain_node;
    3844
    39 /**
    40  * @typedef rtems_chain_control
    41  *
    42  * The chain's control anchors the chain.
    43  */
    4445typedef Chain_Control rtems_chain_control;
    4546
     
    5657  CHAIN_DEFINE_EMPTY(name)
    5758
     59/** @} */
     60
    5861#include <rtems/chain.inl>
     62
     63/**
     64 * @addtogroup ClassicChains
     65 *
     66 * @{
     67 */
     68
     69/**
     70 * @brief Appends the @a node to the @a chain and sends the @a events to the
     71 * @a task if the @a chain was empty before the append.
     72 *
     73 * @see rtems_chain_append_with_empty_check() and rtems_event_send().
     74 *
     75 * @retval RTEMS_SUCCESSFUL Successful operation.
     76 * @retval RTEMS_INVALID_ID No such task.
     77 */
     78rtems_status_code rtems_chain_append_with_notification(
     79  rtems_chain_control *chain,
     80  rtems_chain_node *node,
     81  rtems_id task,
     82  rtems_event_set events
     83);
     84
     85/**
     86 * @brief Prepends the @a node to the @a chain and sends the @a events to the
     87 * @a task if the @a chain was empty before the prepend.
     88 *
     89 * @see rtems_chain_prepend_with_empty_check() and rtems_event_send().
     90 *
     91 * @retval RTEMS_SUCCESSFUL Successful operation.
     92 * @retval RTEMS_INVALID_ID No such task.
     93 */
     94rtems_status_code rtems_chain_prepend_with_notification(
     95  rtems_chain_control *chain,
     96  rtems_chain_node *node,
     97  rtems_id task,
     98  rtems_event_set events
     99);
     100
     101/**
     102 * @brief Gets the first @a node of the @a chain and sends the @a events to the
     103 * @a task if the @a chain is empty after the get.
     104 *
     105 * @see rtems_chain_get_with_empty_check() and rtems_event_send().
     106 *
     107 * @retval RTEMS_SUCCESSFUL Successful operation.
     108 * @retval RTEMS_INVALID_ID No such task.
     109 */
     110rtems_status_code rtems_chain_get_with_notification(
     111  rtems_chain_control *chain,
     112  rtems_id task,
     113  rtems_event_set events,
     114  rtems_chain_node **node
     115);
     116
     117/**
     118 * @brief Gets the first @a node of the @a chain and sends the @a events to the
     119 * @a task if the @a chain is empty afterwards.
     120 *
     121 * @see rtems_chain_get() and rtems_event_receive().
     122 *
     123 * @retval RTEMS_SUCCESSFUL Successful operation.
     124 * @retval RTEMS_TIMEOUT Timeout.
     125 */
     126rtems_status_code rtems_chain_get_with_wait(
     127  rtems_chain_control *chain,
     128  rtems_event_set events,
     129  rtems_interval timeout,
     130  rtems_chain_node **node
     131);
     132
     133/** @} */
    59134
    60135#ifdef __cplusplus
Note: See TracChangeset for help on using the changeset viewer.