OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [itron/] [src/] [del_mbf.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*
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
 *  del_mbf.c,v 1.3 2001/01/24 14:15:04 joel Exp
12
 */
13
 
14
#if HAVE_CONFIG_H
15
#include "config.h"
16
#endif
17
 
18
#include <itron.h>
19
 
20
#include <rtems/itron/msgbuffer.h>
21
#include <rtems/itron/task.h>
22
 
23
/*
24
 *  del_mbf - Delete MessageBuffer
25
 */
26
 
27
ER del_mbf(
28
  ID mbfid
29
)
30
{
31
  ITRON_Message_buffer_Control  *the_message_buffer;
32
  Objects_Locations              location;
33
 
34
  the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location);
35
  switch (location) {
36
    case OBJECTS_REMOTE:
37
    case OBJECTS_ERROR:           /* Multiprocessing not supported */
38
      return _ITRON_Message_buffer_Clarify_get_id_error(mbfid);
39
 
40
    case OBJECTS_LOCAL:
41
      _CORE_message_queue_Flush(&the_message_buffer->message_queue);
42
      _ITRON_Objects_Close( &_ITRON_Message_buffer_Information,
43
                            &the_message_buffer->Object);
44
      _ITRON_Message_buffer_Free(the_message_buffer);
45
 
46
      /*
47
       *  If multiprocessing were supported, this is where we would announce
48
       *  the existence of the semaphore to the rest of the system.
49
       */
50
 
51
#if defined(RTEMS_MULTIPROCESSING)
52
#endif
53
      _Thread_Enable_dispatch();
54
      return E_OK;
55
  }
56
 
57
  return E_OK;
58
}

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.