[962c9b65] | 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 | |
---|
[c627b2a3] | 17 | #ifdef RTEMS_POSIX_API |
---|
| 18 | |
---|
[962c9b65] | 19 | #include <assert.h> |
---|
| 20 | |
---|
[c627b2a3] | 21 | /* |
---|
| 22 | * POSIX_API_INIT is defined so all of the POSIX API |
---|
| 23 | * data will be included in this object file. |
---|
| 24 | */ |
---|
[962c9b65] | 25 | |
---|
[c627b2a3] | 26 | #define POSIX_API_INIT |
---|
[962c9b65] | 27 | |
---|
[c627b2a3] | 28 | #include <rtems/system.h> |
---|
| 29 | |
---|
| 30 | #include <sys/types.h> |
---|
| 31 | #include <rtems/config.h> |
---|
[962c9b65] | 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/pthread.h> |
---|
| 38 | #include <rtems/posix/time.h> |
---|
| 39 | |
---|
| 40 | /*PAGE |
---|
| 41 | * |
---|
| 42 | * _POSIX_API_Initialize |
---|
| 43 | * |
---|
| 44 | * XXX |
---|
| 45 | */ |
---|
| 46 | |
---|
[99f9dffa] | 47 | posix_api_configuration_table _POSIX_Default_configuration = { |
---|
| 48 | 0, /* maximum_threads */ |
---|
| 49 | 0, /* maximum_mutexes */ |
---|
| 50 | 0, /* maximum_condition_variables */ |
---|
| 51 | 0, /* maximum_keys */ |
---|
| 52 | 0, /* number_of_initialization_tasks */ |
---|
| 53 | NULL /* User_initialization_tasks_table */ |
---|
| 54 | }; |
---|
| 55 | |
---|
| 56 | |
---|
[962c9b65] | 57 | void _POSIX_API_Initialize( |
---|
| 58 | rtems_configuration_table *configuration_table |
---|
| 59 | ) |
---|
| 60 | { |
---|
| 61 | posix_api_configuration_table *api_configuration; |
---|
| 62 | |
---|
| 63 | api_configuration = configuration_table->POSIX_api_configuration; |
---|
[99f9dffa] | 64 | if ( !api_configuration ) |
---|
| 65 | api_configuration = &_POSIX_Default_configuration; |
---|
| 66 | |
---|
[962c9b65] | 67 | |
---|
| 68 | |
---|
[c627b2a3] | 69 | _POSIX_Threads_Manager_initialization( |
---|
| 70 | api_configuration->maximum_threads, |
---|
[962c9b65] | 71 | api_configuration->number_of_initialization_tasks, |
---|
| 72 | api_configuration->User_initialization_tasks_table |
---|
| 73 | ); |
---|
| 74 | |
---|
| 75 | _POSIX_Condition_variables_Manager_initialization( |
---|
| 76 | api_configuration->maximum_condition_variables |
---|
| 77 | ); |
---|
| 78 | |
---|
[c627b2a3] | 79 | _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); |
---|
[962c9b65] | 80 | |
---|
| 81 | _POSIX_Mutex_Manager_initialization( |
---|
| 82 | api_configuration->maximum_mutexes |
---|
| 83 | ); |
---|
| 84 | |
---|
| 85 | } |
---|
| 86 | |
---|
[c627b2a3] | 87 | #endif |
---|
[962c9b65] | 88 | /* end of file */ |
---|