OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [sapi/] [src/] [posixapi.c] - Blame information for rev 279

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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.OARcorp.com/rtems/license.html.
12
 *
13
 *  $Id: posixapi.c,v 1.2 2001-09-27 11:59:20 chris Exp $
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
 
51
posix_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
 
64
 
65
void _POSIX_API_Initialize(
66
  rtems_configuration_table *configuration_table
67
)
68
{
69
  posix_api_configuration_table *api_configuration;
70
 
71
  /* XXX need to assert here based on size assumptions */
72
 
73
  assert( sizeof(pthread_t) == sizeof(Objects_Id) );
74
 
75
  api_configuration = configuration_table->POSIX_api_configuration;
76
  if ( !api_configuration )
77
    api_configuration = &_POSIX_Default_configuration;
78
 
79
  _POSIX_signals_Manager_Initialization(
80
    api_configuration->maximum_queued_signals
81
  );
82
 
83
  _POSIX_Threads_Manager_initialization(
84
    api_configuration->maximum_threads,
85
    api_configuration->number_of_initialization_threads,
86
    api_configuration->User_initialization_threads_table
87
  );
88
 
89
  _POSIX_Condition_variables_Manager_initialization(
90
    api_configuration->maximum_condition_variables
91
  );
92
 
93
  _POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
94
 
95
  _POSIX_Mutex_Manager_initialization(
96
    api_configuration->maximum_mutexes
97
  );
98
 
99
  _POSIX_Message_queue_Manager_initialization(
100
    api_configuration->maximum_message_queues
101
  );
102
 
103
  _POSIX_Semaphore_Manager_initialization(
104
    api_configuration->maximum_semaphores
105
  );
106
 
107
  _POSIX_Timer_Manager_initialization ( api_configuration->maximum_timers );
108
}
109
 
110
#endif
111
/* end of file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.