From dcf911ef8f3a2576f214829d13fa02d769d6ff02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sat, 12 Jan 2008 23:11:03 +0000 Subject: [PATCH] * Add function to access the Cookie Jar. * remove unneeded stuff. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23453 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/atari_m68k/Jamfile | 2 +- src/system/boot/platform/atari_m68k/mmu.cpp | 1 - .../boot/platform/atari_m68k/toscalls.h | 25 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/system/boot/platform/atari_m68k/Jamfile b/src/system/boot/platform/atari_m68k/Jamfile index c5feac6872..df12a96300 100644 --- a/src/system/boot/platform/atari_m68k/Jamfile +++ b/src/system/boot/platform/atari_m68k/Jamfile @@ -32,7 +32,7 @@ KernelMergeObject boot_platform_atari_m68k.o : cpu.cpp #smp.cpp #smp_trampoline.S - support.S +# support.S video.cpp #apm.cpp diff --git a/src/system/boot/platform/atari_m68k/mmu.cpp b/src/system/boot/platform/atari_m68k/mmu.cpp index 200a7f1fcd..0d2b0cc897 100644 --- a/src/system/boot/platform/atari_m68k/mmu.cpp +++ b/src/system/boot/platform/atari_m68k/mmu.cpp @@ -7,7 +7,6 @@ #include "mmu.h" -#include "bios.h" #include #include diff --git a/src/system/boot/platform/atari_m68k/toscalls.h b/src/system/boot/platform/atari_m68k/toscalls.h index f4a4df7e0c..a693c8e7e1 100644 --- a/src/system/boot/platform/atari_m68k/toscalls.h +++ b/src/system/boot/platform/atari_m68k/toscalls.h @@ -142,6 +142,31 @@ extern int32 gemdos(uint16 nr, ...); extern status_t toserror(int32 err); +/* + * Cookie Jar access + */ + +typedef struct tos_cookie { + uint32 cookie; + enum { + int32 ivalue; + void *pvalue; + } +} tos_cookie; + +#define COOKIE_JAR (*((const tos_cookie **)0x5A0)) + +static inline tos_cookie *tos_find_cookie(uint32 what) +{ + struct c = COOKIE_JAR; + while (c && (c->cookie)) { + if (c->cookie == what) + return c; + c++; + } + return NULL; +} + #endif /* __ASSEMBLER__ */ #ifdef __cplusplus