Hello, Is there a mutex implementation available for use that does not require the rtx lib? Thanks, JG
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
You would, of course, need your _own_ kernel to use anything like this...
Thanks for the code see!