source: rtems/cpukit/sapi/src/posixapi.c @ a4203273

4.115
Last change on this file since a4203273 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 2.3 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/condimpl.h>
37#include <rtems/posix/mqueueimpl.h>
38#include <rtems/posix/muteximpl.h>
39#include <rtems/posix/priorityimpl.h>
40#include <rtems/posix/psignalimpl.h>
41#include <rtems/posix/pthreadimpl.h>
42#include <rtems/posix/rwlockimpl.h>
43#include <rtems/posix/timerimpl.h>
44#include <rtems/posix/semaphoreimpl.h>
45#include <rtems/posix/spinlockimpl.h>
46#include <rtems/posix/time.h>
47#endif
48
49void _POSIX_Fatal_error( POSIX_Fatal_domain domain, int eno )
50{
51  uint32_t code = ( domain << 8 ) | ( ( uint32_t ) eno & 0xffU );
52
53  _Terminate( INTERNAL_ERROR_POSIX_API, false, code );
54}
55
56Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ];
57
58void _POSIX_API_Initialize(void)
59{
60  /*
61   * If there are any type size assumptions in the POSIX API, this is
62   * the appropriate place to place them.
63   *
64   * Currently, there are no none type size assumptions.
65   */
66
67  /*
68   * Install our API Object Management Table and initialize the
69   * various managers.
70   */
71  _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
72
73  _POSIX_Key_Manager_initialization();
74
75  #ifdef RTEMS_POSIX_API
76    _POSIX_signals_Manager_Initialization();
77    _POSIX_Threads_Manager_initialization();
78    _POSIX_Condition_variables_Manager_initialization();
79    _POSIX_Mutex_Manager_initialization();
80    _POSIX_Message_queue_Manager_initialization();
81    _POSIX_Semaphore_Manager_initialization();
82    _POSIX_Timer_Manager_initialization();
83    _POSIX_Barrier_Manager_initialization();
84    _POSIX_RWLock_Manager_initialization();
85    _POSIX_Spinlock_Manager_initialization();
86  #endif
87}
Note: See TracBrowser for help on using the repository browser.