Changed "struct KernelCallback" to be an union

This commit is contained in:
Alex 2023-03-08 05:25:37 +02:00
parent a265cb59c8
commit 06aa2bb31b
Signed by untrusted user who does not match committer: enderice2
GPG Key ID: EACC3AD603BAB4DD
2 changed files with 59 additions and 54 deletions

View File

@ -119,7 +119,9 @@ enum CallbackReason
InputReason,
};
struct KernelCallback
union KernelCallback
{
struct
{
CallbackReason Reason;
void *RawPtr;
@ -160,6 +162,7 @@ struct KernelCallback
} Fetch;
} DiskCallback;
/** @brief When the kernel wants to get mouse position / keyboard key */
struct
{
struct
@ -180,6 +183,8 @@ struct KernelCallback
{
unsigned char Vector;
} InterruptInfo;
};
unsigned long raw;
} __attribute__((packed));
#endif // !__FENNIX_DRIVER_API_H__

View File

@ -58,7 +58,7 @@ struct Fex
int (*EntryPoint)(void *);
} __attribute__((packed));
struct KernelCallback;
union KernelCallback;
struct FexExtended
{
@ -73,7 +73,7 @@ struct FexExtended
enum FexDriverType Type : 4;
enum FexDriverInputTypes TypeFlags : 4;
bool OverrideOnConflict : 1;
int (*Callback)(struct KernelCallback *);
int (*Callback)(union KernelCallback *);
struct DriverBind
{