MentOS  0.8.0
The Mentoring Operating System
mutex.h
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include "stdint.h"
9 
11 typedef struct mutex_t {
17 
21 void mutex_lock(mutex_t *mutex, uint32_t owner);
22 
25 void mutex_unlock(mutex_t *mutex);
void mutex_unlock(mutex_t *mutex)
Unlocks the mutex.
Definition: mutex.c:30
void mutex_lock(mutex_t *mutex, uint32_t owner)
Allows to lock a mutex.
Definition: mutex.c:9
struct mutex_t mutex_t
Structure of a mutex.
Standard integer data-types.
unsigned int uint32_t
Define the unsigned 32-bit integer.
Definition: stdint.h:18
unsigned char uint8_t
Define the unsigned 8-bit integer.
Definition: stdint.h:30
Structure of a mutex.
Definition: mutex.h:11
uint8_t state
The state of the mutex.
Definition: mutex.h:13
uint32_t owner
The owner of the mutex.
Definition: mutex.h:15