* 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
This commit is contained in:
François Revol
2008-01-12 23:11:03 +00:00
parent 3460f75fb9
commit dcf911ef8f
3 changed files with 26 additions and 2 deletions
+1 -1
View File
@@ -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
@@ -7,7 +7,6 @@
#include "mmu.h"
#include "bios.h"
#include <boot/platform.h>
#include <boot/stdio.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