Added mutex_control syscall for userspace mutexes.

- Compiles and Codezero runs as normal without touching mutex implementation
- Mutex implementation needs testing.

The mutex control syscall allows userspace programs to declare any virtual
address as a mutex lock and ask for help from the kernel syscall
for resolving locking contentions.
This commit is contained in:
Bahadir Balban
2009-05-29 15:34:04 +03:00
parent ab9e036cb7
commit b11d4c4607
16 changed files with 433 additions and 14 deletions

View File

@@ -65,9 +65,12 @@
#define virt_to_phys(addr) ((unsigned int)(addr) - KERNEL_OFFSET)
#endif
#define PAGER_ADDR(x) ((x >= INITTASK_AREA_START) && (x < INITTASK_AREA_END))
#define KERN_ADDR(x) ((x >= KERNEL_AREA_START) && (x < KERNEL_AREA_END))
#define USER_ADDR(x) ((x >= USER_AREA_START) && (x < USER_AREA_END))
#define UTCB_ADDR(x) ((x >= UTCB_AREA_START) && (x < UTCB_AREA_END))
#define SHM_ADDR(x) ((x >= SHM_AREA_START) && (x < SHM_AREA_END))
#define USER_ADDR(x) (((x >= USER_AREA_START) && (x < USER_AREA_END)) || \
UTCB_ADDR(x) || SHM_ADDR(x) || PAGER_ADDR(x))
#define PRIVILEGED_ADDR(x) (KERN_ADDR(x) || (x >= ARM_HIGH_VECTOR) || \
(x >= IO_AREA_START && x < IO_AREA_END))