source: rtems/c/src/tests/sptests/spsize/size.c @ 3aa4c2e0

4.104.114.84.95
Last change on this file since 3aa4c2e0 was 3aa4c2e0, checked in by Joel Sherrill <joel.sherrill@…>, on 08/02/02 at 00:52:14

2002-08-01 Joel Sherrill <joel@…>

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