source: rtems/c/src/libchip/shmdr/addlq.c @ 9eef52b

4.104.114.84.95
Last change on this file since 9eef52b was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on Feb 17, 1998 at 11:46:28 PM

updated copyright to 1998

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/*  void Shm_Locked_queue_Add( lq_cb, ecb )
2 *
3 *  This routine adds an envelope control block to a shared memory queue.
4 *
5 *  Input parameters:
6 *    lq_cb - pointer to a locked queue control block
7 *    ecb   - pointer to an envelope control block
8 *
9 *  Output parameters: NONE
10 *
11 *  COPYRIGHT (c) 1989-1998.
12 *  On-Line Applications Research Corporation (OAR).
13 *  Copyright assigned to U.S. Government, 1994.
14 *
15 *  The license and distribution terms for this file may be
16 *  found in the file LICENSE in this distribution or at
17 *  http://www.OARcorp.com/rtems/license.html.
18 *
19 *  $Id$
20 */
21
22#include <rtems.h>
23#include "shm.h"
24
25void Shm_Locked_queue_Add(
26  Shm_Locked_queue_Control *lq_cb,
27  Shm_Envelope_control     *ecb
28)
29{
30  rtems_unsigned32 index;
31
32  ecb->next  = Shm_Locked_queue_End_of_list;
33  ecb->queue = lq_cb->owner;
34  index      = ecb->index;
35
36  Shm_Lock( lq_cb );
37    if ( Shm_Convert(lq_cb->front) != Shm_Locked_queue_End_of_list )
38      Shm_Envelopes[ Shm_Convert(lq_cb->rear) ].next = index;
39    else
40      lq_cb->front = index;
41    lq_cb->rear  = index;
42  Shm_Unlock( lq_cb );
43}
Note: See TracBrowser for help on using the repository browser.