source: rtems/testsuites/sptests/spsize/size.c @ 07a3253d

4.104.114.84.9
Last change on this file since 07a3253d was 07a3253d, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 23, 1998 at 7:07:58 PM

Added base version of file system infrastructure. This includes a major
overhaul of the RTEMS system call interface. This base file system is
the "In-Memory File System" aka IMFS.

The design and implementation was done by the following people:

+ Joel Sherrill (joel@…)
+ Jennifer Averett (jennifer@…)
+ Steve "Mr Mount" Salitasc (salitasc@…)
+ Kerwin Wade (wade@…)

PROBLEMS
========

+ It is VERY likely that merging this will break the UNIX port. This

can/will be fixed.

+ There is likely some reentrancy/mutual exclusion needed.

+ Eventually, there should be a "mini-IMFS" description table to

eliminate links, symlinks, etc to save memory. All you need to
have "classic RTEMS" functionality is technically directories
and device IO. All the rest could be left out to save memory.

  • Property mode set to 100644
File size: 21.7 KB
Line 
1/*  main
2 *
3 *  This program is run to determine the data space and work space
4 *  requirements of the current version of RTEMS.
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 <rtems/system.h>
18#include <rtems/config.h>
19#include <rtems/directives.h>
20#include <rtems/score/apiext.h>
21#include <rtems/score/copyrt.h>
22#include <rtems/rtems/clock.h>
23#include <rtems/rtems/tasks.h>
24#include <rtems/rtems/dpmem.h>
25#include <rtems/rtems/event.h>
26#include <rtems/extension.h>
27#include <rtems/fatal.h>
28#include <rtems/init.h>
29#include <rtems/score/isr.h>
30#include <rtems/rtems/intr.h>
31#include <rtems/io.h>
32#include <rtems/rtems/message.h>
33#if defined(RTEMS_MULTIPROCESSING)
34#include <rtems/rtems/mp.h>
35#include <rtems/score/mpci.h>
36#endif
37#include <rtems/rtems/part.h>
38#include <rtems/score/priority.h>
39#include <rtems/rtems/ratemon.h>
40#include <rtems/rtems/region.h>
41#include <rtems/rtems/sem.h>
42#include <rtems/rtems/signal.h>
43#include <rtems/score/sysstate.h>
44#include <rtems/score/thread.h>
45#include <rtems/rtems/timer.h>
46#include <rtems/score/tod.h>
47#include <rtems/score/userext.h>
48#include <rtems/score/wkspace.h>
49
50#include <stdlib.h>
51
52/* These are always defined by the executive.
53 *
54 * #include <rtems/copyrt.h>
55 * #include <rtems/tables.h>
56 * #include <rtems/sptables.h>
57 */
58#define  HEAP_OVHD        16    /* wasted heap space per task stack */
59#define  NAME_PTR_SIZE     8    /* size of name and pointer table entries */
60#define  READYCHAINS_SIZE  \
61    ((RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control ))
62
63#define PER_TASK      \
64     (long) (sizeof (Thread_Control) + \
65      NAME_PTR_SIZE + HEAP_OVHD + sizeof( RTEMS_API_Control ))
66#define PER_SEMAPHORE \
67     (long) (sizeof (Semaphore_Control) + NAME_PTR_SIZE)
68#define PER_TIMER     \
69     (long) (sizeof (Timer_Control) + NAME_PTR_SIZE)
70#define PER_MSGQ      \
71     (long) (sizeof (Message_queue_Control) + NAME_PTR_SIZE)
72#define PER_REGN      \
73     (long) (sizeof (Region_Control) + NAME_PTR_SIZE)
74#define PER_PART      \
75     (long) (sizeof (Partition_Control) + NAME_PTR_SIZE)
76#define PER_PERIOD      \
77     (long) (sizeof (Rate_monotonic_Control) + NAME_PTR_SIZE)
78#define PER_PORT      \
79     (long) (sizeof (Dual_ported_memory_Control) + NAME_PTR_SIZE)
80#define PER_EXTENSION     \
81     (long) (sizeof (Extension_Control) + NAME_PTR_SIZE)
82
83#define PER_DRV       (long) (0)
84#define PER_FPTASK    (long) (CONTEXT_FP_SIZE)
85#define PER_GOBTBL    (long) (sizeof (Chain_Control)*4)
86#define PER_NODE      (long) PER_GOBTBL
87#if defined(RTEMS_MULTIPROCESSING)
88#define PER_GOBJECT   (long) (sizeof (Objects_MP_Control))
89#else
90#define PER_GOBJECT   (long) 0
91#endif
92#define PER_PROXY     (long) (sizeof (Thread_Proxy_control))
93
94#if !defined(RTEMS_MULTIPROCESSING) || (CPU_ALL_TASKS_ARE_FP != TRUE)
95#define MPCI_RECEIVE_SERVER_FP (long) 0
96#else
97#define MPCI_RECEIVE_SERVER_FP (long) (sizeof( Context_Control_fp ))
98#endif
99
100#if (CPU_IDLE_TASK_IS_FP == TRUE)
101#define SYSTEM_IDLE_FP (long) (sizeof( Context_Control_fp ))
102#else
103#define SYSTEM_IDLE_FP (long) 0
104#endif
105
106#if defined(RTEMS_MULTIPROCESSING)
107#define MPCI_RECEIVE_SERVER_STACK_SIZE 0
108#endif
109
110#if defined(RTEMS_MULTIPROCESSING)
111#define MP_SYSTEM_TASKS \
112   (MPCI_RECEIVE_SERVER_STACK_SIZE + \
113    sizeof(Thread_Control) + \
114    MPCI_RECEIVE_SERVER_FP)
115#else
116#define MP_SYSTEM_TASKS 0
117#endif
118
119/*
120 *  Idle and the MPCI Receive Server Threads
121 */
122
123#define SYSTEM_TASKS  \
124    (STACK_MINIMUM_SIZE + sizeof(Thread_Control) + SYSTEM_IDLE_FP + \
125     MP_SYSTEM_TASKS)
126
127#define rtems_unsigned32 unsigned32
128
129rtems_unsigned32 sys_req;
130
131/* to avoid warnings */
132int puts();
133int printf();
134int getint();
135#undef getchar
136int getchar();
137void help_size();
138void print_formula();
139
140void size_rtems(
141  int mode
142)
143{
144int uninitialized = 0;
145int initialized = 0;
146
147/*
148 *  The following data is allocated for each Manager:
149 *
150 *    + Per Manager Object Information
151 *      - local pointer table
152 *      - local name table
153 *      - the object's control blocks
154 *      - global name chains
155 *
156 *  The following is the data allocate from the RTEMS Workspace Area.
157 *  The order indicates the order in which RTEMS allocates it.
158 *
159 *    + Object MP
160 *      - Global Object CB's
161 *    + Thread
162 *      - Ready Chain
163 *    + Thread MP
164 *      - Proxies Chain
165 *    + Interrupt Manager
166 *      - Interrupt Stack
167 *    + Timer Manager
168 *      - per Manager Object Data
169 *    + Extension Manager
170 *      - per Manager Object Data
171 *    + Message Queue Manager
172 *      - per Manager Object Data
173 *      - Message Buffers
174 *    + Semaphore Manager
175 *      - per Manager Object Data
176 *    + Partition Manager
177 *      - per Manager Object Data
178 *    + Region Manager
179 *      - per Manager Object Data
180 *    + Dual Ported Memory Manager
181 *      - per Manager Object Data
182 *    + Rate Monotonic Manager
183 *      - per Manager Object Data
184 *    + Internal Threads Handler
185 *      - MPCI Receive Server Thread TCB
186 *      - IDLE Thread TCB
187 *      - MPCI Receive Server Thread stack
188 *      - MPCI Receive Server Thread FP area (if CPU requires this)
189 *      - IDLE Thread stack
190 *      - IDLE Thread FP area (if CPU requires this)
191 *
192 *  This does not take into account any CPU dependent alignment requirements.
193 *
194 *  The following calculates the overhead needed by RTEMS from the
195 *  Workspace Area.
196 */
197sys_req = SYSTEM_TASKS     +     /* MPCI Receive Server and IDLE */
198          NAME_PTR_SIZE    +     /* Task Overhead */
199          READYCHAINS_SIZE +     /* Ready Chains */
200          NAME_PTR_SIZE    +     /* Timer Overhead */
201          NAME_PTR_SIZE    +     /* Semaphore Overhead */
202          NAME_PTR_SIZE    +     /* Message Queue Overhead */
203          NAME_PTR_SIZE    +     /* Region Overhead */
204          NAME_PTR_SIZE    +     /* Partition Overhead */
205          NAME_PTR_SIZE    +     /* Dual-Ported Memory Overhead */
206          NAME_PTR_SIZE    +     /* Rate Monotonic Overhead */
207          NAME_PTR_SIZE    +     /* Extension Overhead */
208          PER_NODE;              /* Extra Gobject Table */
209
210uninitialized =
211/*address.h*/   0                                         +
212
213/*apiext.h*/    (sizeof _API_extensions_List)             +
214
215/*asr.h*/       0                                         +
216
217/*attr.h*/      0                                         +
218
219/*bitfield.h*/  0                                         +
220
221/*chain.h*/     0                                         +
222
223/*clock.h*/     0                                         +
224
225/*config.h*/    (sizeof _Configuration_Table)             +
226                (sizeof _Configuration_MP_table)          +
227
228/*context.h*/   (sizeof _Context_Switch_necessary)        +
229
230/*copyrt.h*/    0                                         +
231
232/*debug.h*/     (sizeof _Debug_Level)                     +
233
234/*dpmem.h*/     (sizeof _Dual_ported_memory_Information)  +
235
236/*event.h*/     (sizeof _Event_Sync_state)                +
237
238#if defined(RTEMS_MULTIPROCESSING)
239/*eventmp.h*/   0                                         +
240#endif
241
242/*eventset.h*/  0                                         +
243
244/*extension.h*/ (sizeof _Extension_Information)           +
245
246/*fatal.h*/     0                                         +
247
248/*heap.h*/      0                                         +
249
250/*init.h*/      0                                         +
251
252/*interr.h*/    (sizeof Internal_errors_What_happened)    +
253
254/*intr.h*/      0                                         +
255
256/*io.h*/        (sizeof _IO_Number_of_drivers)            +
257                (sizeof _IO_Driver_address_table)         +
258                (sizeof _IO_Number_of_devices)            +
259                (sizeof _IO_Driver_name_table)            +
260
261/*isr.h*/       (sizeof _ISR_Nest_level)                  +
262                (sizeof _ISR_Vector_table)                +
263                (sizeof _ISR_Signals_to_thread_executing) +
264
265/*message.h*/   (sizeof _Message_queue_Information)       +
266
267/*modes.h*/     0                                         +
268
269#if defined(RTEMS_MULTIPROCESSING)
270/*mp.h*/        0                                         +
271#endif
272
273#if defined(RTEMS_MULTIPROCESSING)
274/*mpci.h*/      (sizeof _MPCI_Remote_blocked_threads)     +
275                (sizeof _MPCI_Semaphore)                  +
276                (sizeof _MPCI_table)                      +
277                (sizeof _MPCI_Receive_server_tcb)         +
278                (sizeof _MPCI_Packet_processors)          +
279#endif
280
281#if defined(RTEMS_MULTIPROCESSING)
282/*mppkt.h*/     0                                         +
283#endif
284
285#if defined(RTEMS_MULTIPROCESSING)
286/*mptables.h*/  0                                         +
287#endif
288
289#if defined(RTEMS_MULTIPROCESSING)
290/*msgmp.h*/     0                                         +
291#endif
292
293/*object.h*/    (sizeof _Objects_Local_node)              +
294                (sizeof _Objects_Maximum_nodes)           +
295                (sizeof _Objects_Information_table)       +
296
297#if defined(RTEMS_MULTIPROCESSING)
298/*objectmp.h*/  (sizeof _Objects_MP_Maximum_global_objects) +
299                (sizeof _Objects_MP_Inactive_global_objects) +
300#endif
301
302/*options.h*/   0                                         +
303
304/*part.h*/      (sizeof _Partition_Information)           +
305
306#if defined(RTEMS_MULTIPROCESSING)
307/*partmp.h*/    0                                         +
308#endif
309
310/*priority.h*/  (sizeof _Priority_Major_bit_map)          +
311                (sizeof _Priority_Bit_map)                +
312
313/*ratemon.h*/   (sizeof _Rate_monotonic_Information)      +
314
315/*region.h*/    (sizeof _Region_Information)              +
316
317#if defined(RTEMS_MULTIPROCESSING)
318/*regionmp.h*/  0                                         +
319#endif
320
321/*rtems.h*/     /* Not applicable */
322
323/*sem.h*/       (sizeof _Semaphore_Information)           +
324
325#if defined(RTEMS_MULTIPROCESSING)
326/*semmp.h*/     0                                         +
327#endif
328
329/*signal.h*/    0                                         +
330
331/*signalmp.h*/  0                                         +
332
333/*stack.h*/     0                                         +
334
335/*states.h*/    0                                         +
336
337/*status.h*/    0                                         +
338
339/*sysstate.h*/  (sizeof _System_state_Is_multiprocessing) +
340                (sizeof _System_state_Current)            +
341
342/*system.h*/    (sizeof _CPU_Table)                       +
343
344#if defined(RTEMS_MULTIPROCESSING)
345/*taskmp.h*/    0                                         +
346#endif
347
348/*tasks.h*/     (sizeof _RTEMS_tasks_Information)         +
349                (sizeof _RTEMS_tasks_User_initialization_tasks) +
350                (sizeof _RTEMS_tasks_Number_of_initialization_tasks) +
351
352/*thread.h*/    (sizeof _Thread_BSP_context)              +
353                (sizeof _Thread_Dispatch_disable_level)   +
354                (sizeof _Thread_Do_post_task_switch_extension) +
355                (sizeof _Thread_Maximum_extensions)       +
356                (sizeof _Thread_Ticks_per_timeslice)      +
357                (sizeof _Thread_Ready_chain)              +
358                (sizeof _Thread_Executing)                +
359                (sizeof _Thread_Heir)                     +
360                (sizeof _Thread_Allocated_fp)             +
361                (sizeof _Thread_Internal_information)     +
362                (sizeof _Thread_Idle)                     +
363
364#if defined(RTEMS_MULTIPROCESSING)
365/*threadmp.h*/  (sizeof _Thread_MP_Receive)               +
366                (sizeof _Thread_MP_Active_proxies)        +
367                (sizeof _Thread_MP_Inactive_proxies)      +
368#endif
369
370/*threadq.h*/   (sizeof _Thread_queue_Extract_table)      +
371
372/*timer.h*/     (sizeof _Timer_Information)               +
373
374/*tod.h*/       (sizeof _TOD_Current)                     +
375                (sizeof _TOD_Seconds_since_epoch)         +
376                (sizeof _TOD_Microseconds_per_tick)       +
377                (sizeof _TOD_Ticks_per_second)            +
378                (sizeof _TOD_Seconds_watchdog)            +
379
380/*tqdata.h*/    0                                         +
381
382/*types.h*/     0                                         +
383
384/*userext.h*/   (sizeof _User_extensions_List)            +
385
386/*watchdog.h*/  (sizeof _Watchdog_Sync_level)             +
387                (sizeof _Watchdog_Sync_count)             +
388                (sizeof _Watchdog_Ticks_since_boot)       +
389                (sizeof _Watchdog_Ticks_chain)            +
390                (sizeof _Watchdog_Seconds_chain)          +
391
392/*wkspace.h*/   (sizeof _Workspace_Area);
393
394uninitialized = 0;
395
396#ifndef unix  /* make sure this is not a native compile */
397
398#ifdef __i386__
399
400/* cpu.h */
401uninitialized += (sizeof _CPU_Null_fp_context) +
402                 (sizeof _CPU_Interrupt_stack_low) +
403                 (sizeof _CPU_Interrupt_stack_high);
404
405#endif
406
407#ifdef __i960__
408
409/* cpu.h */
410uninitialized += (sizeof _CPU_Interrupt_stack_low) +
411                 (sizeof _CPU_Interrupt_stack_high);
412
413#endif
414
415#ifdef __hppa__
416
417/* cpu.h */
418uninitialized += (sizeof _CPU_Null_fp_context) +
419#ifndef RTEMS_UNIX
420                 (sizeof _CPU_Default_gr27) +
421#endif
422                 (sizeof _CPU_Interrupt_stack_low) +
423                 (sizeof _CPU_Interrupt_stack_high);
424#endif
425
426#ifdef __mc68000__
427
428/* cpu.h */
429uninitialized += (sizeof _CPU_Interrupt_stack_low) +
430                 (sizeof _CPU_Interrupt_stack_high);
431
432#endif
433
434#ifdef __sparc__
435 
436/* cpu.h */
437uninitialized += (sizeof _CPU_Interrupt_stack_low) +
438                 (sizeof _CPU_Interrupt_stack_high) +
439                 (sizeof _CPU_Null_fp_context);
440
441#ifndef NO_TABLE_MOVE
442uninitialized += (sizeof _CPU_Trap_Table_area);
443#endif
444
445#ifdef erc32
446uninitialized += (sizeof _ERC32_MEC_Timer_Control_Mirror);
447#endif
448
449 
450#endif
451
452
453#ifdef no_cpu
454
455/* cpu.h */
456uninitialized += (sizeof _CPU_Null_fp_context) +
457                 (sizeof _CPU_Interrupt_stack_low) +
458                 (sizeof _CPU_Interrupt_stack_high) +
459                 (sizeof _CPU_Thread_dispatch_pointer);
460
461#endif
462
463#ifdef __PPC__
464
465/* cpu.h */
466uninitialized += (sizeof _CPU_Interrupt_stack_low) +
467                 (sizeof _CPU_Interrupt_stack_high) +
468                 (sizeof _CPU_IRQ_info);
469
470#endif
471#endif /* !unix */
472
473initialized +=
474/*copyrt.h*/    (strlen(_Copyright_Notice)+1)             +
475
476/*sptables.h*/  (sizeof _Initialization_Default_multiprocessing_table)  +
477                (strlen(_RTEMS_version)+1)      +
478                (sizeof _Entry_points)          +
479
480
481/*tod.h*/       (sizeof _TOD_Days_per_month)    +
482                (sizeof _TOD_Days_to_date)      +
483                (sizeof _TOD_Days_since_last_leap_year);
484
485#ifndef unix /* make sure this is not native */
486#ifdef __sparc__
487
488initialized +=  (sizeof _CPU_Trap_slot_template);
489
490#endif
491#endif /* !unix */
492
493puts( "" );
494
495  if ( mode == 0 ) help_size();
496  else             print_formula();
497
498printf( "\n" );
499printf( "RTEMS uninitialized data consumes %d bytes\n", uninitialized );
500printf( "RTEMS intialized data consumes %d bytes\n", initialized );
501
502}
503
504void help_size()
505{
506int c = '\0';
507int break_loop;
508int total_size;
509int task_stacks;
510int interrupt_stack;
511int maximum_tasks, size_tasks;
512int maximum_sems, size_sems;
513int maximum_timers, size_timers;
514int maximum_msgqs, size_msgqs;
515int maximum_msgs, size_msgs_overhead;
516int maximum_regns, size_regns;
517int maximum_parts, size_parts;
518int maximum_ports, size_ports;
519int maximum_periods, size_periods;
520int maximum_extensions, size_extensions;
521int maximum_drvs, size_drvs;
522int maximum_fps, size_fps;
523int maximum_nodes, size_nodes;
524int maximum_gobjs, size_gobjs;
525int maximum_proxies, size_proxies;
526
527total_size = sys_req;    /* Fixed Overhead */
528printf( "What is maximum_tasks? " );
529maximum_tasks = getint();
530size_tasks = PER_TASK * maximum_tasks;
531total_size += size_tasks;
532
533printf( "What is maximum_semaphores? " );
534maximum_sems = getint();
535size_sems = PER_SEMAPHORE * maximum_sems;
536total_size += size_sems;
537
538printf( "What is maximum_timers? " );
539maximum_timers = getint();
540size_timers = PER_TIMER * maximum_timers;
541total_size += size_timers;
542
543printf( "What is maximum_message_queues? " );
544maximum_msgqs = getint();
545size_msgqs = PER_MSGQ * maximum_msgqs;
546total_size += size_msgqs;
547
548printf( "What is maximum_messages?  XXXX " );
549maximum_msgs = getint();
550size_msgs_overhead = 0;
551total_size += size_msgs_overhead;
552
553printf( "What is maximum_regions? " );
554maximum_regns = getint();
555size_regns = PER_REGN * maximum_regns;
556total_size += size_regns;
557
558printf( "What is maximum_partitions? " );
559maximum_parts = getint();
560size_parts = PER_PART * maximum_parts;
561total_size += size_parts;
562
563printf( "What is maximum_ports? " );
564maximum_ports = getint();
565size_ports = PER_PORT * maximum_ports;
566total_size += size_ports;
567
568printf( "What is maximum_periods? " );
569maximum_periods = getint();
570size_periods = PER_PORT * maximum_periods;
571total_size += size_periods;
572
573printf( "What is maximum_extensions? " );
574maximum_extensions = getint();
575size_extensions = PER_EXTENSION * maximum_extensions;
576total_size += size_extensions;
577
578printf( "What is number_of_device_drivers? " );
579maximum_drvs = getint();
580size_drvs = PER_DRV  * maximum_drvs;
581total_size += size_drvs;
582
583printf( "What will be total stack requirement for all tasks? " );
584task_stacks = getint();
585total_size += task_stacks;
586
587printf( "What is the size of the interrupt stack? " );
588interrupt_stack = getint();
589total_size += interrupt_stack;
590
591printf( "How many tasks will be created with the FP flag? " );
592maximum_fps = getint();
593size_fps = PER_FPTASK  * maximum_fps;
594total_size += size_fps;
595
596printf( "Is this a single processor system? " );
597for ( break_loop=0 ; !break_loop; c = getchar() ) {
598  switch ( c ) {
599    case 'Y':  case 'y':
600    case 'N':  case 'n':
601      break_loop = 1;
602      break;
603  }
604}
605printf( "%c\n", c );
606if ( c == 'n' || c == 'N' ) {
607  printf( "What is maximum_nodes? " );
608  maximum_nodes = getint();
609  size_nodes = PER_NODE * maximum_nodes;
610  total_size += size_nodes;
611  printf( "What is maximum_global_objects? " );
612  maximum_gobjs = getint();
613  size_gobjs = PER_GOBJECT * maximum_gobjs;
614  total_size += size_gobjs;
615  printf( "What is maximum_proxies? " );
616  maximum_proxies = getint();
617  size_proxies = PER_PROXY * maximum_proxies;
618  total_size += size_proxies;
619} else {
620  maximum_nodes = 0;
621  size_nodes = PER_NODE * 0;
622  maximum_gobjs = 0;
623  size_gobjs = PER_GOBJECT * 0;
624  maximum_proxies = 0;
625  size_proxies = PER_PROXY * 0;
626}
627
628printf( "\n\n" );
629printf( " ************** EXECUTIVE WORK SPACE REQUIRED **************\n" );
630printf( " Tasks                - %03d * %03ld            =  %ld\n",
631          maximum_tasks, PER_TASK, (long) size_tasks );
632printf( " Semaphores           - %03d * %03ld            =  %ld\n",
633          maximum_sems, PER_SEMAPHORE, (long) size_sems );
634printf( " Timers               - %03d * %03ld            =  %ld\n",
635          maximum_timers, PER_TIMER, (long) size_timers );
636printf( " Msg Queues           - %03d * %03ld            =  %ld\n",
637          maximum_msgqs, PER_MSGQ, (long) size_msgqs );
638printf( " Messages Overhead    - %03d * %03d            =  %ld\n",
639          maximum_msgs, 0 /* PER_MSG_OVERHEAD */, (long) size_msgs_overhead );
640printf( " Regions              - %03d * %03ld            =  %ld\n",
641          maximum_regns, PER_REGN, (long) size_regns);
642printf( " Partitions           - %03d * %03ld            =  %ld\n",
643          maximum_parts, PER_PART, (long) size_parts );
644printf( " Periods              - %03d * %03ld            =  %ld\n",
645          maximum_periods, PER_PERIOD, (long) size_periods );
646printf( " Extensions           - %03d * %03ld            =  %ld\n",
647          maximum_extensions, PER_EXTENSION, (long) size_extensions );
648printf( " Device Drivers       - %03d * %03ld            =  %ld\n",
649          maximum_drvs, PER_DRV, (long) size_drvs );
650
651printf( " System Requirements  - %04d                 =  %d\n",
652          sys_req, sys_req );
653
654printf( " Floating Point Tasks - %03d * %03ld            =  %ld\n",
655          maximum_fps, PER_FPTASK, (long) size_fps );
656printf( " Application Task Stacks -                     =  %d\n",
657          task_stacks );
658printf( " Interrupt Stacks -                            =  %d\n",
659          task_stacks );
660printf( " \n" );
661printf( " Global object tables - %03d * %03ld            =  %ld\n",
662          maximum_nodes, PER_NODE, (long) size_nodes );
663printf( " Global objects       - %03d * %03ld            =  %ld\n",
664          maximum_gobjs, PER_GOBJECT, (long) size_gobjs );
665printf( " Proxies              - %03d * %03ld            =  %ld\n",
666          maximum_proxies, PER_PROXY, (long) size_proxies );
667printf( "\n\n" );
668printf( " TOTAL                                       = %d bytes\n",
669      total_size );
670}
671
672void print_formula()
673{
674printf( " ************** EXECUTIVE WORK SPACE FORMULA **************\n" );
675printf( " Tasks                - maximum_tasks * %ld\n",      PER_TASK );
676printf( " Timers               - maximum_timers * %ld\n",     PER_TIMER );
677printf( " Semaphores           - maximum_semaphores * %ld\n", PER_SEMAPHORE);
678printf( " Message Queues       - maximum_message_queues * %ld\n", PER_MSGQ );
679printf( " Messages             -\n");
680printf( " Regions              - maximum_regions * %ld\n",    PER_REGN );
681printf( " Partitions           - maximum_partitions * %ld\n", PER_PART );
682printf( " Ports                - maximum_ports * %ld\n",      PER_PORT );
683printf( " Periods              - maximum_periods * %ld\n",    PER_PORT );
684printf( " Extensions           - maximum_extensions * %ld\n", PER_EXTENSION );
685printf( " Device Drivers       - number_of_device_drivers * %ld\n", PER_DRV);
686printf( " System Requirements  - %d\n",                       sys_req );
687printf( " Floating Point Tasks - FPMASK Tasks * %ld\n",       PER_FPTASK );
688printf( " User's Tasks' Stacks -\n" );
689printf( " Interrupt Stack      -\n" );
690printf( " \n" );
691printf( " Global object tables - maximum_nodes * %ld\n",          PER_NODE );
692printf( " Global objects       - maximum_global_objects * %ld\n", PER_GOBJECT );
693printf( " Proxies              - maximum_proxies * %ld\n",        PER_PROXY );
694}
Note: See TracBrowser for help on using the repository browser.