AnsweredAssumed Answered

Mr.EAI, Where is the defination of these functions ?

Question asked by Yu TianYu on Jun 19, 2009
Latest reply on Jun 19, 2009 by Craig Honegger

Dear EAI,

I have already read all help files about MQX RTOS. I, all the while, Can not find the definations of these functions which writed in MQX.c and mqx_prv.h.

In mqx_prv.h, there is a setjmp(b) on line 211.

These codes are

/*--------------------------------------------------------------------------*/
/*
**                       MQX INITIALIZATION DEFINITIONS
*/

/*
** The maximum number of task templates for a MQX application.
*/
#define MQX_MAXIMUM_NUMBER_OF_TASK_TEMPLATES (0xFFFF)

/*
** The scaler to use to initialize the default time slice value. It is used
** in conjunction with MQX's tick rate (ticks per second). The default
** time slice frequency = ticks per second / MQX_DEFAULT_TIME_SLICE
*/
#define MQX_DEFAULT_TIME_SLICE  ((_mqx_uint)10)

#ifndef MQX_SETJMP
#define MQX_SETJMP(b)    setjmp(b)
#endif
#ifndef MQX_LONGJMP
#define MQX_LONGJMP(b,n) longjmp(b,n)
#endif
NOW,WHERE ARE THE DEFINATION OF setjmp(b) and longjmp(b,n)???

My second question to consult a parameter that is _mqx_exit_jump_buffer_internal.
It is located on line 106 in MQX.c
These codes are
_mqx_uint _mqx
   (
      /* [IN] the address of the MQX initialzation structure */
      register MQX_INITIALIZATION_STRUCT_PTR mqx_init
   )
{ /* Body */
   KERNEL_DATA_STRUCT_PTR   kernel_data;
   TASK_TEMPLATE_STRUCT_PTR template_ptr;
   TD_STRUCT_PTR            td_ptr;
   _mqx_uint                result;
   pointer                  stack_ptr;
   pointer                  sys_td_stack_ptr;
   uchar_ptr                sys_stack_base_ptr;

#if MQX_EXIT_ENABLED || MQX_CRIPPLED_EVALUATION
   /* Setup a longjmp buffer using setjmp, so that if an error occurs
   ** in mqx initialization, we can perform a longjmp to this location.
   **
   ** Also _mqx_exit will use this jumpbuffer to longjmp to here in order
   ** to cleanly exit MQX.
   */
   if ( MQX_SETJMP( _mqx_exit_jump_buffer_internal ) ) {
      _GET_KERNEL_DATA(kernel_data);
      _int_set_vector_table(kernel_data->USERS_VBR);
      return kernel_data->USERS_ERROR;
   } /* Endif */
#endif

Where is the _mqx_exit_jump_buffer_internal ?
 
Finally, I have a suggestion to tell you and your company.
The MQX RTOS for Freescale is a really powerful Software. The efficiency of MQX RTOS is really good. But Your company and freescale didn't  provide a file about architecture of MQX RTOS. There are only MQX RTOS UG and other API RM. But they didn't write all the defination of functions and micros in detail. Just like setjmp(b) and longjmp(b,n) that are in my problems.
Would your company or Freescale semiconductor provide a web seminar about introduction of MQX RTOS in detail? Or your company or Freescale semiconductor may provide a file to introduce the architecture of the MQX RTOS? I think that we don't need a samll introduction in five minutes. We really need a fully introduction about the software in detail. I consider that this is a only way to solve any weird problem, just like my problem.
And This is a only way to introduce the powerful MCU to all engineer.
 
Thank you for your Help.
Sincerely Yours
fish_yu

Outcomes