From d3b44eeac975853a68462ff9a627cd69891818da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 28 Oct 2003 21:26:08 +0000 Subject: [PATCH] Added definition of a of_arguments structure which is used in all OpenFirmware client service calls (and callbacks). Has nice inline argument getter methods If compiled under C++. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5205 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/platform/openfirmware/openfirmware.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/kernel/boot/platform/openfirmware/openfirmware.h b/src/kernel/boot/platform/openfirmware/openfirmware.h index df4330b646..f5c03a6a30 100644 --- a/src/kernel/boot/platform/openfirmware/openfirmware.h +++ b/src/kernel/boot/platform/openfirmware/openfirmware.h @@ -15,6 +15,18 @@ extern int gChosen; +struct of_arguments { + const char *name; + int num_args; + int num_returns; + int data[0]; + +#ifdef __cplusplus + int &Argument(int index) { return data[index]; } + int &ReturnValue(int index) { return data[num_args + index]; } +#endif +}; + struct of_region { void *base; uint32 size;