mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 17:53:13 +01:00
Mutex test progress
- Mutex test added. Forked tasks demonstrate produce/consumer using a shared mmap'ed page. - Added l4lib assembler syscall - Added forgotten SWI to mutex control offset in syscall page. - Added mutex head initialization - Contended child successfully sleeps in a waitqueue. Issues: - Somehow the child's produced page buffer is altered at about [4020] offset. Parent fails to validate buffer therefore. - Need to add syncing to test so that parent does not unlock and lock again before child has a chance to lock buffer and produce.
This commit is contained in:
@@ -197,6 +197,18 @@ BEGIN_PROC(l4_space_control)
|
||||
ldmfd sp!, {pc} @ Restore original lr and return.
|
||||
END_PROC(l4_space_control)
|
||||
|
||||
/*
|
||||
* Locks/unlocks a userspace mutex.
|
||||
* @r0 = mutex virtual address, @r1 = mutex operation code
|
||||
*/
|
||||
BEGIN_PROC(l4_mutex_control)
|
||||
stmfd sp!, {lr}
|
||||
ldr r12, =__l4_mutex_control
|
||||
mov lr, pc
|
||||
ldr pc, [r12]
|
||||
ldmfd sp!, {pc} @ Restore original lr and return.
|
||||
END_PROC(l4_mutex_control)
|
||||
|
||||
/*
|
||||
* Sets registers of a thread and its pager.
|
||||
* @r0 = ptr to exregs_data structure, @r1 = tid of thread.
|
||||
|
||||
Reference in New Issue
Block a user