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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [itron/] [src/] [del_mbf.c] - Blame information for rev 757

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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: del_mbf.c,v 1.2 2001-09-27 11:59:13 chris Exp $
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
 
23
ER 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
}

powered by: WebSVN 2.1.0

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