source: rtems/cpukit/sapi/src/posixapi.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.6 KB
Line 
1/**
2 * @file
3 *
4 * @brief Initialize POSIX API
5 *
6 * @ingroup ClassicRTEMS
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2014.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#if HAVE_CONFIG_H
19#include "config.h"
20#endif
21
22#define POSIX_API_INIT
23
24#include <rtems/system.h>    /* include this before checking RTEMS_POSIX_API */
25
26#include <rtems/config.h>
27#include <rtems/posix/keyimpl.h>
28#include <rtems/posix/posixapi.h>
29
30#ifdef RTEMS_POSIX_API
31#include <sys/types.h>
32#include <mqueue.h>
33#include <rtems/config.h>
34#include <rtems/posix/barrierimpl.h>
35#include <rtems/posix/config.h>
36#include <rtems/posix/priorityimpl.h>
37#include <rtems/posix/psignalimpl.h>
38#include <rtems/posix/rwlockimpl.h>
39#include <rtems/posix/timerimpl.h>
40#include <rtems/posix/spinlockimpl.h>
41#endif
42
43void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
44{
45  uint32_t code = ( domain << 8 ) | ( ( uint32_t ) eno & 0xffU );
46
47  _Terminate( INTERNAL_ERROR_POSIX_API, false, code );
48}
49
50void _POSIX_API_Initialize(void)
51{
52  /*
53   * If there are any type size assumptions in the POSIX API, this is
54   * the appropriate place to place them.
55   *
56   * Currently, there are no none type size assumptions.
57   */
58
59  _POSIX_Key_Manager_initialization();
60
61  #ifdef RTEMS_POSIX_API
62    _POSIX_Timer_Manager_initialization();
63    _POSIX_Barrier_Manager_initialization();
64    _POSIX_RWLock_Manager_initialization();
65    _POSIX_Spinlock_Manager_initialization();
66  #endif
67}
Note: See TracBrowser for help on using the repository browser.