source: rtems/testsuites/sptests/spsize/size.c @ beaa47bc

4.104.114.84.95
Last change on this file since beaa47bc was beaa47bc, checked in by Joel Sherrill <joel.sherrill@…>, on 04/04/02 at 22:29:47

2001-04-04 Joel Sherrill <joel@…>

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