source: rtems/c/src/exec/sapi/src/posixapi.c @ 0747e2d

4.104.114.84.95
Last change on this file since 0747e2d was 0747e2d, checked in by Joel Sherrill <joel.sherrill@…>, on 02/03/99 at 16:22:18

POSIX Timers submitted by Juan Zamorano Flores
<jzamora@…>.

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