source: rtems/testsuites/sptests/spsize/size.c @ 95ec9e98

4.115
Last change on this file since 95ec9e98 was 95ec9e98, checked in by Joel Sherrill <joel.sherrill@…>, on 11/24/10 at 16:06:22

2010-11-24 Gedare Bloom <giddyup44@…>

PR 1647/cpukit

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