source: rtems/cpukit/sapi/src/posixapi.c @ 6c678557

5
Last change on this file since 6c678557 was 6c678557, checked in by Sebastian Huber <sebastian.huber@…>, on 12/14/15 at 15:36:21

Optional POSIX Timer initialization

Update #2408.

  • Property mode set to 100644
File size: 1.5 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/spinlockimpl.h>
40#endif
41
42void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
43{
44  uint32_t code = ( domain << 8 ) | ( ( uint32_t ) eno & 0xffU );
45
46  _Terminate( INTERNAL_ERROR_POSIX_API, false, code );
47}
48
49void _POSIX_API_Initialize(void)
50{
51  /*
52   * If there are any type size assumptions in the POSIX API, this is
53   * the appropriate place to place them.
54   *
55   * Currently, there are no none type size assumptions.
56   */
57
58  _POSIX_Key_Manager_initialization();
59
60  #ifdef RTEMS_POSIX_API
61    _POSIX_Barrier_Manager_initialization();
62    _POSIX_RWLock_Manager_initialization();
63    _POSIX_Spinlock_Manager_initialization();
64  #endif
65}
Note: See TracBrowser for help on using the repository browser.