mirror of
https://github.com/drasko/codezero.git
synced 2026-06-30 20:44:11 +02:00
Kernel updates since December 2009
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include <capability.h>
|
||||
#include <l4lib/arch/syslib.h>
|
||||
#include <l4lib/ipcdefs.h>
|
||||
#include L4LIB_INC_ARCH(syslib.h)
|
||||
|
||||
int cap_request_pager(struct capability *cap)
|
||||
{
|
||||
|
||||
@@ -26,14 +26,16 @@ int clonetest(void)
|
||||
void *child_stack;
|
||||
|
||||
/* Parent loops and calls clone() to clone new threads. Children don't come back from the clone() call */
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
if ((child_stack = mmap(0, 0x1000, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_GROWSDOWN, 0, 0)) == MAP_FAILED) {
|
||||
test_printf("MMAP failed.\n");
|
||||
goto out_err;
|
||||
} else {
|
||||
test_printf("Mapped area starting at %p\n", child_stack);
|
||||
}
|
||||
((int *)child_stack)[-1] = 5; /* Test mapped area */
|
||||
// printf("mmap returned child stack: %p\n", child_stack);
|
||||
|
||||
// ((int *)child_stack)[-1] = 5; /* Test mapped area */
|
||||
|
||||
test_printf("Cloning...\n");
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include <alloca.h>
|
||||
#include <l4lib/ipcdefs.h>
|
||||
|
||||
#define PAGE_SIZE 0x1000
|
||||
|
||||
extern char _start_test_exec[];
|
||||
extern char _end_test_exec[];
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* Copyright (C) 2007-2009 Bahadir Bilgehan Balban
|
||||
*/
|
||||
#include <l4lib/arch/syslib.h>
|
||||
#include <l4lib/ipcdefs.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
#include <tests.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define PAGE_SIZE 0x1000
|
||||
|
||||
int mmaptest(void)
|
||||
{
|
||||
int fd;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
*
|
||||
* Copyright (C) 2007-2009 Bahadir Bilgehan Balban
|
||||
*/
|
||||
#include <l4lib/arch/syslib.h>
|
||||
#include <l4lib/ipcdefs.h>
|
||||
#include <l4lib/mutex.h>
|
||||
#include <errno.h>
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <l4lib/arch/syslib.h>
|
||||
#include <l4lib/kip.h>
|
||||
#include <l4lib/utcb.h>
|
||||
#include <l4lib/ipcdefs.h>
|
||||
|
||||
Reference in New Issue
Block a user