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

4.104.114.84.95
Last change on this file since f26145b was 16351f7a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/28/05 at 02:04:21

2005-01-28 Ralf Corsepius <ralf.corsepius@…>

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