source: rtems/c/src/exec/itron/src/del_mbf.c @ 9d9a3dd

4.104.114.84.95
Last change on this file since 9d9a3dd was 9d9a3dd, checked in by Jennifer Averett <Jennifer.Averett@…>, on 11/17/99 at 16:47:58

+ Updated copyright information.

  • Property mode set to 100644
File size: 1.3 KB
Line 
1/*
2 *  ITRON Message Buffer Manager
3 *
4 *  COPYRIGHT (c) 1989-1999.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.OARcorp.com/rtems/license.html.
10 *
11 *  $Id$
12 */
13
14#include <itron.h>
15
16#include <rtems/itron/msgbuffer.h>
17#include <rtems/itron/task.h>
18
19/*
20 *  del_mbf - Delete MessageBuffer
21 */
22
23ER del_mbf(
24  ID mbfid
25)
26{
27  ITRON_Message_buffer_Control  *the_message_buffer;
28  Objects_Locations              location;
29
30  the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location);
31  switch (location) {
32    case OBJECTS_REMOTE:
33    case OBJECTS_ERROR:           /* Multiprocessing not supported */
34      return _ITRON_Message_buffer_Clarify_get_id_error(mbfid);
35
36    case OBJECTS_LOCAL:
37      _CORE_message_queue_Flush(&the_message_buffer->message_queue);
38      _ITRON_Objects_Close( &_ITRON_Message_buffer_Information,
39                            &the_message_buffer->Object);
40      _ITRON_Message_buffer_Free(the_message_buffer);
41
42      /*
43       *  If multiprocessing were supported, this is where we would announce
44       *  the existence of the semaphore to the rest of the system.
45       */
46
47#if defined(RTEMS_MULTIPROCESSING)
48#endif
49      _Thread_Enable_dispatch();
50      return E_OK;
51  }
52 
53  return E_OK;
54}
Note: See TracBrowser for help on using the repository browser.