source: rtems/testsuites/sptests/spsize/size.c @ 0a32a21

4.104.114.84.9
Last change on this file since 0a32a21 was 0a32a21, checked in by Joel Sherrill <joel.sherrill@…>, on Mar 28, 2002 at 7:30:51 PM

2001-03-28 Joel Sherrill <joel@…>

  • Side-effect of PR132.
  • sp21/system.h: Now must explicitly request NULL driver.
  • Property mode set to 100644
File size: 21.6 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#ifndef NO_TABLE_MOVE
443uninitialized += (sizeof _CPU_Trap_Table_area);
444#endif
445
446#endif
447
448
449#ifdef no_cpu
450
451/* cpu.h */
452uninitialized += (sizeof _CPU_Null_fp_context) +
453                 (sizeof _CPU_Interrupt_stack_low) +
454                 (sizeof _CPU_Interrupt_stack_high) +
455                 (sizeof _CPU_Thread_dispatch_pointer);
456
457#endif
458
459#ifdef __PPC__
460
461/* cpu.h */
462uninitialized += (sizeof _CPU_Interrupt_stack_low) +
463                 (sizeof _CPU_Interrupt_stack_high) +
464                 (sizeof _CPU_IRQ_info);
465
466#endif
467#endif /* !unix */
468
469initialized +=
470/*copyrt.h*/    (strlen(_Copyright_Notice)+1)             +
471
472/*sptables.h*/  (sizeof _Initialization_Default_multiprocessing_table)  +
473                (strlen(_RTEMS_version)+1)      +
474                (sizeof _Entry_points)          +
475
476
477/*tod.h*/       (sizeof _TOD_Days_per_month)    +
478                (sizeof _TOD_Days_to_date)      +
479                (sizeof _TOD_Days_since_last_leap_year);
480
481#ifndef unix /* make sure this is not native */
482#ifdef __sparc__
483
484initialized +=  (sizeof _CPU_Trap_slot_template);
485
486#endif
487#endif /* !unix */
488
489puts( "" );
490
491  if ( mode == 0 ) help_size();
492  else             print_formula();
493
494printf( "\n" );
495printf( "RTEMS uninitialized data consumes %d bytes\n", uninitialized );
496printf( "RTEMS intialized data consumes %d bytes\n", initialized );
497
498}
499
500void help_size()
501{
502int c = '\0';
503int break_loop;
504int total_size;
505int task_stacks;
506int interrupt_stack;
507int maximum_tasks, size_tasks;
508int maximum_sems, size_sems;
509int maximum_timers, size_timers;
510int maximum_msgqs, size_msgqs;
511int maximum_msgs, size_msgs_overhead;
512int maximum_regns, size_regns;
513int maximum_parts, size_parts;
514int maximum_ports, size_ports;
515int maximum_periods, size_periods;
516int maximum_extensions, size_extensions;
517int maximum_drvs, size_drvs;
518int maximum_fps, size_fps;
519int maximum_nodes, size_nodes;
520int maximum_gobjs, size_gobjs;
521int maximum_proxies, size_proxies;
522
523total_size = sys_req;    /* Fixed Overhead */
524printf( "What is maximum_tasks? " );
525maximum_tasks = getint();
526size_tasks = PER_TASK * maximum_tasks;
527total_size += size_tasks;
528
529printf( "What is maximum_semaphores? " );
530maximum_sems = getint();
531size_sems = PER_SEMAPHORE * maximum_sems;
532total_size += size_sems;
533
534printf( "What is maximum_timers? " );
535maximum_timers = getint();
536size_timers = PER_TIMER * maximum_timers;
537total_size += size_timers;
538
539printf( "What is maximum_message_queues? " );
540maximum_msgqs = getint();
541size_msgqs = PER_MSGQ * maximum_msgqs;
542total_size += size_msgqs;
543
544printf( "What is maximum_messages?  XXXX " );
545maximum_msgs = getint();
546size_msgs_overhead = 0;
547total_size += size_msgs_overhead;
548
549printf( "What is maximum_regions? " );
550maximum_regns = getint();
551size_regns = PER_REGN * maximum_regns;
552total_size += size_regns;
553
554printf( "What is maximum_partitions? " );
555maximum_parts = getint();
556size_parts = PER_PART * maximum_parts;
557total_size += size_parts;
558
559printf( "What is maximum_ports? " );
560maximum_ports = getint();
561size_ports = PER_PORT * maximum_ports;
562total_size += size_ports;
563
564printf( "What is maximum_periods? " );
565maximum_periods = getint();
566size_periods = PER_PORT * maximum_periods;
567total_size += size_periods;
568
569printf( "What is maximum_extensions? " );
570maximum_extensions = getint();
571size_extensions = PER_EXTENSION * maximum_extensions;
572total_size += size_extensions;
573
574printf( "What is number_of_device_drivers? " );
575maximum_drvs = getint();
576size_drvs = PER_DRV  * maximum_drvs;
577total_size += size_drvs;
578
579printf( "What will be total stack requirement for all tasks? " );
580task_stacks = getint();
581total_size += task_stacks;
582
583printf( "What is the size of the interrupt stack? " );
584interrupt_stack = getint();
585total_size += interrupt_stack;
586
587printf( "How many tasks will be created with the FP flag? " );
588maximum_fps = getint();
589size_fps = PER_FPTASK  * maximum_fps;
590total_size += size_fps;
591
592printf( "Is this a single processor system? " );
593for ( break_loop=0 ; !break_loop; c = getchar() ) {
594  switch ( c ) {
595    case 'Y':  case 'y':
596    case 'N':  case 'n':
597      break_loop = 1;
598      break;
599  }
600}
601printf( "%c\n", c );
602if ( c == 'n' || c == 'N' ) {
603  printf( "What is maximum_nodes? " );
604  maximum_nodes = getint();
605  size_nodes = PER_NODE * maximum_nodes;
606  total_size += size_nodes;
607  printf( "What is maximum_global_objects? " );
608  maximum_gobjs = getint();
609  size_gobjs = PER_GOBJECT * maximum_gobjs;
610  total_size += size_gobjs;
611  printf( "What is maximum_proxies? " );
612  maximum_proxies = getint();
613  size_proxies = PER_PROXY * maximum_proxies;
614  total_size += size_proxies;
615} else {
616  maximum_nodes = 0;
617  size_nodes = PER_NODE * 0;
618  maximum_gobjs = 0;
619  size_gobjs = PER_GOBJECT * 0;
620  maximum_proxies = 0;
621  size_proxies = PER_PROXY * 0;
622}
623
624printf( "\n\n" );
625printf( " ************** EXECUTIVE WORK SPACE REQUIRED **************\n" );
626printf( " Tasks                - %03d * %03ld            =  %ld\n",
627          maximum_tasks, PER_TASK, (long) size_tasks );
628printf( " Semaphores           - %03d * %03ld            =  %ld\n",
629          maximum_sems, PER_SEMAPHORE, (long) size_sems );
630printf( " Timers               - %03d * %03ld            =  %ld\n",
631          maximum_timers, PER_TIMER, (long) size_timers );
632printf( " Msg Queues           - %03d * %03ld            =  %ld\n",
633          maximum_msgqs, PER_MSGQ, (long) size_msgqs );
634printf( " Messages Overhead    - %03d * %03d            =  %ld\n",
635          maximum_msgs, 0 /* PER_MSG_OVERHEAD */, (long) size_msgs_overhead );
636printf( " Regions              - %03d * %03ld            =  %ld\n",
637          maximum_regns, PER_REGN, (long) size_regns);
638printf( " Partitions           - %03d * %03ld            =  %ld\n",
639          maximum_parts, PER_PART, (long) size_parts );
640printf( " Periods              - %03d * %03ld            =  %ld\n",
641          maximum_periods, PER_PERIOD, (long) size_periods );
642printf( " Extensions           - %03d * %03ld            =  %ld\n",
643          maximum_extensions, PER_EXTENSION, (long) size_extensions );
644printf( " Device Drivers       - %03d * %03ld            =  %ld\n",
645          maximum_drvs, PER_DRV, (long) size_drvs );
646
647printf( " System Requirements  - %04d                 =  %d\n",
648          sys_req, sys_req );
649
650printf( " Floating Point Tasks - %03d * %03ld            =  %ld\n",
651          maximum_fps, PER_FPTASK, (long) size_fps );
652printf( " Application Task Stacks -                     =  %d\n",
653          task_stacks );
654printf( " Interrupt Stacks -                            =  %d\n",
655          task_stacks );
656printf( " \n" );
657printf( " Global object tables - %03d * %03ld            =  %ld\n",
658          maximum_nodes, PER_NODE, (long) size_nodes );
659printf( " Global objects       - %03d * %03ld            =  %ld\n",
660          maximum_gobjs, PER_GOBJECT, (long) size_gobjs );
661printf( " Proxies              - %03d * %03ld            =  %ld\n",
662          maximum_proxies, PER_PROXY, (long) size_proxies );
663printf( "\n\n" );
664printf( " TOTAL                                       = %d bytes\n",
665      total_size );
666}
667
668void print_formula()
669{
670printf( " ************** EXECUTIVE WORK SPACE FORMULA **************\n" );
671printf( " Tasks                - maximum_tasks * %ld\n",      PER_TASK );
672printf( " Timers               - maximum_timers * %ld\n",     PER_TIMER );
673printf( " Semaphores           - maximum_semaphores * %ld\n", PER_SEMAPHORE);
674printf( " Message Queues       - maximum_message_queues * %ld\n", PER_MSGQ );
675printf( " Messages             -\n");
676printf( " Regions              - maximum_regions * %ld\n",    PER_REGN );
677printf( " Partitions           - maximum_partitions * %ld\n", PER_PART );
678printf( " Ports                - maximum_ports * %ld\n",      PER_PORT );
679printf( " Periods              - maximum_periods * %ld\n",    PER_PORT );
680printf( " Extensions           - maximum_extensions * %ld\n", PER_EXTENSION );
681printf( " Device Drivers       - number_of_device_drivers * %ld\n", PER_DRV);
682printf( " System Requirements  - %d\n",                       sys_req );
683printf( " Floating Point Tasks - FPMASK Tasks * %ld\n",       PER_FPTASK );
684printf( " User's Tasks' Stacks -\n" );
685printf( " Interrupt Stack      -\n" );
686printf( " \n" );
687printf( " Global object tables - maximum_nodes * %ld\n",          PER_NODE );
688printf( " Global objects       - maximum_global_objects * %ld\n", PER_GOBJECT );
689printf( " Proxies              - maximum_proxies * %ld\n",        PER_PROXY );
690}
Note: See TracBrowser for help on using the repository browser.