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


** The maximum number of task templates for a MQX application.

** 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)
#define MQX_LONGJMP(b,n) longjmp(b,n)
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;
   TD_STRUCT_PTR            td_ptr;
   _mqx_uint                result;
   pointer                  stack_ptr;
   pointer                  sys_td_stack_ptr;
   uchar_ptr                sys_stack_base_ptr;

   /* 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 ) ) {
      return kernel_data->USERS_ERROR;
   } /* 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