source: rtems/cpukit/posix/src/semaphore.c @ 2189b3e

5
Last change on this file since 2189b3e was 2189b3e, checked in by Sebastian Huber <sebastian.huber@…>, on 12/14/15 at 15:34:50

Optional POSIX Semaphore initialization

Update #2408.

  • Property mode set to 100644
File size: 1.8 KB
Line 
1/**
2 * @file
3 *
4 * @brief POSIX Function Initializes Semaphore Manager
5 * @ingroup POSIXAPI
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2008.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <stdarg.h>
22
23#include <errno.h>
24#include <fcntl.h>
25#include <pthread.h>
26#include <semaphore.h>
27#include <limits.h>
28
29#include <rtems/system.h>
30#include <rtems/config.h>
31#include <rtems/sysinit.h>
32#include <rtems/posix/semaphoreimpl.h>
33#include <rtems/seterr.h>
34
35Objects_Information _POSIX_Semaphore_Information;
36
37/*
38 *  _POSIX_Semaphore_Manager_initialization
39 *
40 *  This routine initializes all semaphore manager related data structures.
41 *
42 *  Input parameters:   NONE
43 *
44 *  Output parameters:  NONE
45 */
46
47static void _POSIX_Semaphore_Manager_initialization(void)
48{
49  _Objects_Initialize_information(
50    &_POSIX_Semaphore_Information, /* object information table */
51    OBJECTS_POSIX_API,          /* object API */
52    OBJECTS_POSIX_SEMAPHORES,   /* object class */
53    Configuration_POSIX_API.maximum_semaphores,
54                                /* maximum objects of this class */
55    sizeof( POSIX_Semaphore_Control ),
56                                /* size of this object's control block */
57    true,                       /* true if names for this object are strings */
58    _POSIX_PATH_MAX             /* maximum length of each object's name */
59#if defined(RTEMS_MULTIPROCESSING)
60    ,
61    false,                      /* true if this is a global object class */
62    NULL                        /* Proxy extraction support callout */
63#endif
64  );
65}
66
67RTEMS_SYSINIT_ITEM(
68  _POSIX_Semaphore_Manager_initialization,
69  RTEMS_SYSINIT_POSIX_SEMAPHORE,
70  RTEMS_SYSINIT_ORDER_MIDDLE
71);
Note: See TracBrowser for help on using the repository browser.