source: rtems/cpukit/sapi/src/posixapi.c @ 599d71f

Last change on this file since 599d71f was 21789a21, checked in by Sebastian Huber <sebastian.huber@…>, on Jul 28, 2015 at 12:45:42 PM

score: Rename _POSIX_Absolute_timeout_to_ticks()

Rename _POSIX_Absolute_timeout_to_ticks() to
_TOD_Absolute_timeout_to_ticks() and move it to the score directory.
Delete empty <rtems/posix/time.h>.

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