#1673 closed enhancement (fixed)

Chain append and prepend with empty check

Reported by: Sebastian Huber Owned by: Joel Sherrill
Priority: normal Milestone: 4.11
Component: score Version: 4.11
Severity: minor Keywords:
Cc: Peer Stritzinger Blocked By:
Blocking:

Description

I want to propose new chain functions. For the basic API please have a look at the attached patch.

The following functions will be derived from them:

_Chain_Append_with_empty_check()
_Chain_Prepend_with_empty_check()
rtems_chain_append_with_empty_check_unprotected()
rtems_chain_prepend_with_empty_check_unprotected()
rtems_chain_append_with_empty_check()
rtems_chain_prepend_with_empty_check()

You can use this for very simple queues, e.g.

consumer:

while (true) {

wait for enqueue event receive;
while (item = chain_get()) {

process item;

}

}

producer:

do_send_event = chain_append_with_empty_check(item)
if (do_send_event) {

send enqueue event;

}

Attachments (2)

chain.patch (2.1 KB) - added by Sebastian Huber on Aug 13, 2010 at 12:24:07 PM.
Base API.
chain_v1.patch (1.9 KB) - added by Sebastian Huber on Aug 13, 2010 at 12:30:02 PM.
Removed copy and paste.

Download all attachments as: .zip

Change History (6)

Changed on Aug 13, 2010 at 12:24:07 PM by Sebastian Huber

Attachment: chain.patch added

Base API.

Changed on Aug 13, 2010 at 12:30:02 PM by Sebastian Huber

Attachment: chain_v1.patch added

Removed copy and paste.

comment:1 Changed on Aug 13, 2010 at 12:30:02 PM by Sebastian Huber

attachments.isobsolete: 01

comment:2 Changed on Aug 16, 2010 at 1:11:51 PM by Peer Stritzinger

Cc: Peer Stritzinger added

comment:3 Changed on Aug 24, 2010 at 2:02:16 PM by Sebastian Huber

Resolution: fixed
Status: newclosed

Committed to CVS head.

comment:4 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.