/** * This function returns the appropriate stack size given the requested * size. If the requested size is below the minimum, then the minimum * configured stack size is returned. * * @param[in] size is the stack size to check * * @return This method returns the appropriate stack size. */ RTEMS_INLINE_ROUTINE size_t _Stack_Ensure_minimum ( size_t size ) { if ( size >= _Stack_Minimum() ) return size; return _Stack_Minimum(); }
void _MPCI_Create_server( void ) { Objects_Name name; if ( !_System_state_Is_multiprocessing ) return; /* * Initialize the MPCI Receive Server */ _MPCI_Receive_server_tcb = _Thread_Internal_allocate(); name.name_u32 = _Objects_Build_name( 'M', 'P', 'C', 'I' ); _Thread_Initialize( &_Thread_Internal_information, _MPCI_Receive_server_tcb, NULL, /* allocate the stack */ _Stack_Minimum() + CPU_MPCI_RECEIVE_SERVER_EXTRA_STACK + _Configuration_MP_table->extra_mpci_receive_server_stack, CPU_ALL_TASKS_ARE_FP, PRIORITY_MINIMUM, false, /* no preempt */ THREAD_CPU_BUDGET_ALGORITHM_NONE, NULL, /* no budget algorithm callout */ 0, /* all interrupts enabled */ name ); _Thread_Start( _MPCI_Receive_server_tcb, THREAD_START_NUMERIC, (void *) _MPCI_Receive_server, NULL, 0, NULL ); }
/** * This function returns true if size bytes is enough memory for * a valid stack area on this processor, and false otherwise. * * @param[in] size is the stack size to check * * @return This method returns true if the stack is large enough. */ RTEMS_INLINE_ROUTINE bool _Stack_Is_enough ( size_t size ) { return ( size >= _Stack_Minimum() ); }