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

4.104.114.84.95
Last change on this file since 8486081 was 8486081, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/16/04 at 11:54:29

Remove stray white spaces.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*
2 *  RTEMS API Initialization Support
3 *
4 *  NOTE:
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#include <assert.h>
17
18/*
19 *  POSIX_API_INIT is defined so all of the POSIX API
20 *  data will be included in this object file.
21 */
22
23#define POSIX_API_INIT
24
25#include <rtems/system.h>    /* include this before checking RTEMS_POSIX_API */
26#ifdef RTEMS_POSIX_API
27
28#include <sys/types.h>
29#include <mqueue.h>
30#include <rtems/config.h>
31#include <rtems/score/object.h>
32#include <rtems/posix/cond.h>
33#include <rtems/posix/config.h>
34#include <rtems/posix/key.h>
35#include <rtems/posix/mqueue.h>
36#include <rtems/posix/mutex.h>
37#include <rtems/posix/priority.h>
38#include <rtems/posix/psignal.h>
39#include <rtems/posix/pthread.h>
40#include <rtems/posix/ptimer.h>
41#include <rtems/posix/semaphore.h>
42#include <rtems/posix/time.h>
43
44/*PAGE
45 *
46 *  _POSIX_API_Initialize
47 *
48 *  XXX
49 */
50
51posix_api_configuration_table _POSIX_Default_configuration = {
52  0,                             /* maximum_threads */
53  0,                             /* maximum_mutexes */
54  0,                             /* maximum_condition_variables */
55  0,                             /* maximum_keys */
56  0,                             /* maximum_timers */
57  0,                             /* maximum_queued_signals */
58  0,                             /* number_of_initialization_threads */
59  0,                             /* maximum_message_queues */
60  0,                             /* maximum_semaphores */
61  NULL                           /* User_initialization_threads_table */
62};
63
64Objects_Information *_POSIX_Objects[ OBJECTS_POSIX_CLASSES_LAST + 1 ];
65
66
67void _POSIX_API_Initialize(
68  rtems_configuration_table *configuration_table
69)
70{
71  posix_api_configuration_table *api_configuration;
72
73  /* XXX need to assert here based on size assumptions */
74
75  assert( sizeof(pthread_t) == sizeof(Objects_Id) );
76
77  api_configuration = configuration_table->POSIX_api_configuration;
78  if ( !api_configuration )
79    api_configuration = &_POSIX_Default_configuration;
80
81  _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
82
83  _POSIX_signals_Manager_Initialization(
84    api_configuration->maximum_queued_signals
85  );
86
87  _POSIX_Threads_Manager_initialization(
88    api_configuration->maximum_threads,
89    api_configuration->number_of_initialization_threads,
90    api_configuration->User_initialization_threads_table
91  );
92
93  _POSIX_Condition_variables_Manager_initialization(
94    api_configuration->maximum_condition_variables
95  );
96
97  _POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
98
99  _POSIX_Mutex_Manager_initialization(
100    api_configuration->maximum_mutexes
101  );
102
103  _POSIX_Message_queue_Manager_initialization(
104    api_configuration->maximum_message_queues
105  );
106
107  _POSIX_Semaphore_Manager_initialization(
108    api_configuration->maximum_semaphores
109  );
110
111  _POSIX_Timer_Manager_initialization ( api_configuration->maximum_timers );
112}
113
114#endif
115/* end of file */
Note: See TracBrowser for help on using the repository browser.