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

4.104.114.84.95
Last change on this file since e35d6b2 was ca7858bb, checked in by Joel Sherrill <joel.sherrill@…>, on 07/26/00 at 19:28:11

Port of RTEMS to the Texas Instruments C3x/C4x DSP families including
a BSP (c4xsim) supporting the simulator included with gdb. This port
was done by Joel Sherrill and Jennifer Averett of OAR Corporation.
Also included with this port is a space/time optimization to eliminate
FP context switch management on CPUs without hardware or software FP.

An issue with this port was that sizeof(unsigned32) = sizeof(unsigned8)
on this CPU. This required addressing alignment checks and assumptions
as well as fixing code that assumed sizeof(unsigned32) == 4.

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