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 implementation for m3 without rtx lib

Hello,
Is there a mutex implementation available for use that does not require the rtx lib?
Thanks,
JG

Parents
  • typedef enum
    {
            e_mutex_unlocked = 0,
            e_mutex_locked
    } mutex_state ;
    
    typedef struct
    {
            mutex_state                     state ; // the status of the synchronization element
            int32s                          owner ; // a mutex has one owning task. other tasks must wait for it to be released
            priority_queue_t        blocked_tasks ; // // a queue of task id's that are waiting for a mutex to be released
    } t_mutex ;
    
    static t_mutex                     s_mutexes[MAX_MUTEXES] ; // system mutexs
    

Reply
  • typedef enum
    {
            e_mutex_unlocked = 0,
            e_mutex_locked
    } mutex_state ;
    
    typedef struct
    {
            mutex_state                     state ; // the status of the synchronization element
            int32s                          owner ; // a mutex has one owning task. other tasks must wait for it to be released
            priority_queue_t        blocked_tasks ; // // a queue of task id's that are waiting for a mutex to be released
    } t_mutex ;
    
    static t_mutex                     s_mutexes[MAX_MUTEXES] ; // system mutexs
    

Children