This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mutex trouble

Hi,
When I create task and debug function fi_Test1 program crach on acces to memory.
What is cause of it?
Thank You

int fi_Test1(void)
{
   int res;
   START_LOCK (int);

   RETURN (res);
   END_LOCK;
}

__task void fv_SdCard_10ms (void)
{
  // fv_InitCard();
   fi_Test1();
   for (;;)
   {
     os_dly_wait (1);
   }
}
//-----------------------------------------------------------------------------
__task void init (void)
{

        fv_SendMenuStr("\rSystem start \r\n");
        fv_SendMenuStr("Wejscie do MENU poprzez 'M' \r\n");

        t_phaseA = os_tsk_create(fv_TerminalTask, 1);
        t_phaseB = os_tsk_create(fv_Task_10ms, 1);
        t_SdCard = os_tsk_create(fv_SdCard_10ms, 1);

        os_tsk_delete_self ();
}

/* Mutex lock macros. */
#define START_LOCK(type)        type rval;                          \ 
                                _mutex_acquire(&_stream_list_lock);
#define RETURN(x)               rval = (x);                         \ 
                                goto end_of_func;
#define END_LOCK                end_of_func:                        \ 
                                _mutex_release(&_stream_list_lock); \ 
                                return (rval);


0