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

4.104.114.84.95
Last change on this file since f7e46cf0 was f7e46cf0, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 28, 1997 at 11:35:01 PM

With the transition from command line macro definitions to targopts.h,
it was necessary to include system.h before checking if anything was
defined.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 *  RTEMS API Initialization Support
3 *
4 *  NOTE:
5 *
6 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
7 *  On-Line Applications Research Corporation (OAR).
8 *  All rights assigned to U.S. Government, 1994.
9 *
10 *  This material may be reproduced by or for the U.S. Government pursuant
11 *  to the copyright license under the clause at DFARS 252.227-7013.  This
12 *  notice must appear in all copies of this file and its derivatives.
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/time.h>
40
41/*PAGE
42 *
43 *  _POSIX_API_Initialize
44 *
45 *  XXX
46 */
47
48posix_api_configuration_table _POSIX_Default_configuration = {
49  0,                             /* maximum_threads */
50  0,                             /* maximum_mutexes */
51  0,                             /* maximum_condition_variables */
52  0,                             /* maximum_keys */
53  0,                             /* maximum_queued_signals */
54  0,                             /* number_of_initialization_threads */
55  NULL                           /* User_initialization_threads_table */
56};
57
58
59void _POSIX_API_Initialize(
60  rtems_configuration_table *configuration_table
61)
62{
63  posix_api_configuration_table *api_configuration;
64
65  /* XXX need to assert here based on size assumptions */
66
67  assert( sizeof(pthread_t) == sizeof(Objects_Id) );
68
69  api_configuration = configuration_table->POSIX_api_configuration;
70  if ( !api_configuration ) 
71    api_configuration = &_POSIX_Default_configuration;
72
73  _POSIX_signals_Manager_Initialization(
74    api_configuration->maximum_queued_signals
75  );
76
77  _POSIX_Threads_Manager_initialization(
78    api_configuration->maximum_threads,
79    api_configuration->number_of_initialization_threads,
80    api_configuration->User_initialization_threads_table
81  );
82 
83  _POSIX_Condition_variables_Manager_initialization(
84    api_configuration->maximum_condition_variables
85  );
86
87  _POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
88
89  _POSIX_Mutex_Manager_initialization( 
90    api_configuration->maximum_mutexes
91  );
92
93}
94
95#endif
96/* end of file */
Note: See TracBrowser for help on using the repository browser.