source: rtems/cpukit/rtems/src/sem.c @ db80f11

4.104.115
Last change on this file since db80f11 was db80f11, checked in by Joel Sherrill <joel.sherrill@…>, on 12/17/08 at 20:21:40

2008-12-17 Joel Sherrill <joel.sherrill@…>

  • rtems/Makefile.am, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/barrier.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/intr.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/src/barrier.c, rtems/src/dpmem.c, rtems/src/msg.c, rtems/src/part.c, rtems/src/ratemon.c, rtems/src/region.c, rtems/src/rtemstimer.c, rtems/src/sem.c, rtems/src/tasks.c, sapi/src/rtemsapi.c: Convert manager initialization routines to directly pull parameters from configuration table. Eliminate empty routines sportted.
  • rtems/src/intr.c: Removed.
  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2 *  Semaphore Manager
3 *
4 *  DESCRIPTION:
5 *
6 *  This package is the implementation of the Semaphore Manager.
7 *  This manager utilizes standard Dijkstra counting semaphores to provide
8 *  synchronization and mutual exclusion capabilities.
9 *
10 *  Directives provided are:
11 *
12 *     + create a semaphore
13 *     + get an ID of a semaphore
14 *     + delete a semaphore
15 *     + acquire a semaphore
16 *     + release a semaphore
17 *
18 *  COPYRIGHT (c) 1989-2008.
19 *  On-Line Applications Research Corporation (OAR).
20 *
21 *  The license and distribution terms for this file may be
22 *  found in the file LICENSE in this distribution or at
23 *  http://www.rtems.com/license/LICENSE.
24 *
25 *  $Id$
26 */
27
28#if HAVE_CONFIG_H
29#include "config.h"
30#endif
31
32#include <rtems/system.h>
33#include <rtems/config.h>
34#include <rtems/rtems/status.h>
35#include <rtems/rtems/support.h>
36#include <rtems/rtems/attr.h>
37#include <rtems/score/isr.h>
38#include <rtems/score/object.h>
39#include <rtems/rtems/options.h>
40#include <rtems/rtems/sem.h>
41#include <rtems/score/coremutex.h>
42#include <rtems/score/coresem.h>
43#include <rtems/score/states.h>
44#include <rtems/score/thread.h>
45#include <rtems/score/threadq.h>
46#if defined(RTEMS_MULTIPROCESSING)
47#include <rtems/score/mpci.h>
48#endif
49#include <rtems/score/sysstate.h>
50
51#include <rtems/score/interr.h>
52
53/*PAGE
54 *
55 *  _Semaphore_Manager_initialization
56 *
57 *  This routine initializes all semaphore manager related data structures.
58 *
59 *  Input parameters:   NONE
60 *
61 *  Output parameters:  NONE
62 */
63
64void _Semaphore_Manager_initialization(void)
65{
66  _Objects_Initialize_information(
67    &_Semaphore_Information,     /* object information table */
68    OBJECTS_CLASSIC_API,         /* object API */
69    OBJECTS_RTEMS_SEMAPHORES,    /* object class */
70     Configuration_RTEMS_API.maximum_semaphores,
71                                 /* maximum objects of this class */
72    sizeof( Semaphore_Control ), /* size of this object's control block */
73    FALSE,                       /* TRUE if the name is a string */
74    RTEMS_MAXIMUM_NAME_LENGTH    /* maximum length of an object name */
75#if defined(RTEMS_MULTIPROCESSING)
76    ,
77    TRUE,                        /* TRUE if this is a global object class */
78    _Semaphore_MP_Send_extract_proxy /* Proxy extraction support callout */
79#endif
80  );
81
82  /*
83   *  Register the MP Process Packet routine.
84   */
85
86#if defined(RTEMS_MULTIPROCESSING)
87  _MPCI_Register_packet_processor(
88    MP_PACKET_SEMAPHORE,
89    _Semaphore_MP_Process_packet
90  );
91#endif
92
93}
Note: See TracBrowser for help on using the repository browser.