mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 19:03:15 +01:00
- 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.
17 lines
343 B
C
17 lines
343 B
C
#ifndef __MUTEX_CONTROL_H__
|
|
#define __MUTEX_CONTROL_H__
|
|
|
|
/* Request ids for mutex_control syscall */
|
|
|
|
#if defined (__KERNEL__)
|
|
#define MUTEX_CONTROL_LOCK L4_MUTEX_LOCK
|
|
#define MUTEX_CONTROL_UNLOCK L4_MUTEX_UNLOCK
|
|
|
|
void init_mutex_queue_head(void);
|
|
#endif
|
|
|
|
#define L4_MUTEX_LOCK 0
|
|
#define L4_MUTEX_UNLOCK 1
|
|
|
|
#endif /* __MUTEX_CONTROL_H__*/
|