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

4.115
Last change on this file since edde99b was edde99b, checked in by Sebastian Huber <sebastian.huber@…>, on 06/14/13 at 12:26:34

score: Rename rtems_smp_get_number_of_processors()

Rename in rtems_smp_get_processor_count(). Always provide
<rtems/score/smp.h> and <rtems/rtems/smp.h>. Add
_SMP_Get_processor_count(). This function will be a compile time
constant defined to be one on uni-processor configurations. This allows
iterations over all processors without overhead on uni-processor
configurations.

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