aboutsummaryrefslogtreecommitdiff
path: root/src/util/mutex.h
blob: f8178a25433a8a1ae34f66f53a8d486864b384b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef UTIL_MUTEX_H
#define UTIL_MUTEX_H

#define NULL_PID 0
#define SYS_PID 1
#define SCHED_PID 2

struct Mutex {
	unsigned long* addr;
	unsigned long pid;
} __attribute__((packed, aligned(4)));;

unsigned char lock_mutex(struct Mutex*, unsigned long);
unsigned char release_mutex(struct Mutex*, unsigned long);

#endif