source: rtems/testsuites/sptests/spsize/size.c @ 1b4f2b30

4.104.114.84.95
Last change on this file since 1b4f2b30 was 1b4f2b30, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/16/04 at 09:24:30

Remove stray white spaces.

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