XenevaOS
Loading...
Searching...
No Matches
postbox.h
Go to the documentation of this file.
1
32#ifndef __POSTBOX_H__
33#define __POSTBOX_H__
34
35#include <stdint.h>
36#ifdef ARCH_X64
37#include <Hal\x86_64_sched.h>
38#elif ARCH_ARM64
39#include <Hal/AA64/sched.h>
40#endif
41#include <Fs/vfs.h>
42
43
44#define POSTBOX_CREATE 401
45#define POSTBOX_DESTROY 402
46#define POSTBOX_PUT_EVENT 403
47#define POSTBOX_GET_EVENT 404
48#define POSTBOX_CREATE_ROOT 405
49#define POSTBOX_GET_EVENT_ROOT 406
50
51#define POSTBOX_NO_EVENT -1
52#define POSTBOX_ROOT_ID 1
53
54//#pragma pack(push,1)
55/*
56 * PostEvent -- event message structure
57 */
76//#pragma pack(pop)
77
78#ifdef ARCH_X64
79#pragma pack(push,1)
80#endif
91#ifdef ARCH_X64
92#pragma pack(pop)
93#endif
94
99extern void AuIPCPostBoxInitialise();
100
105extern void PostBoxPutEvent(PostEvent* event);
106
107#ifdef ARCH_X64
108/*
109 * PostBoxGetEvent -- get an event from post box and copy it to a
110 * memory area
111 * @param event -- pointer to a memory area
112 * @param root -- is this post box is root
113 * @param curr_thread -- Pointer to current thread
114 */
115extern int PostBoxGetEvent(PostEvent* event, bool root, AuThread* curr_thread);
116#elif ARCH_ARM64
124extern int PostBoxGetEvent(PostEvent* event, bool root, AA64Thread* curr_thread);
125#endif
126
128
134extern void PostBoxCreate(bool root, uint16_t tid);
135
141extern void PostBoxDestroyByID(uint16_t id);
142
150extern int PostBoxIOControl(AuVFSNode* file, int code, void* arg);
151
152
153#endif
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
unsigned short int uint16_t
Definition acefiex.h:162
int PostBoxGetEvent(PostEvent *event, bool root, AuThread *curr_thread)
Definition postbox.cpp:186
void PostBoxCreate(bool root, uint16_t tid)
PostBoxCreate – creates a postbox.
Definition postbox.cpp:80
void PostBoxDestroyByID(uint16_t id)
PostBoxDestroyByID – destroys a post box identified by an id.
Definition postbox.cpp:138
int PostBoxIOControl(AuVFSNode *file, int code, void *arg)
PostBoxIOControl – I/O Control function for post box manager.
Definition postbox.cpp:220
void AuIPCPostBoxInitialise()
AuIPCPostBoxInitialise – initialise the post box ipc manager.
Definition postbox.cpp:265
void PostBoxPutEvent(PostEvent *event)
PostBoxPutEvent – put an event to a specific post box.
Definition postbox.cpp:156
struct _postbox_ PostBox
AuVFSNode * AuPostBOXGetNode()
Definition postbox.c:280
struct _post_event_ PostEvent
Definition vfs.h:89
Definition x86_64_sched.h:118
Definition postbox.h:58
uint32_t dword
Definition postbox.h:62
uint32_t dword4
Definition postbox.h:65
uint32_t dword3
Definition postbox.h:64
char * charValue
Definition postbox.h:72
uint32_t dword2
Definition postbox.h:63
uint32_t * pValue1
Definition postbox.h:71
uint8_t type
Definition postbox.h:59
uint32_t dword6
Definition postbox.h:67
uint16_t from_id
Definition postbox.h:61
uint32_t dword5
Definition postbox.h:66
uint16_t to_id
Definition postbox.h:60
char charValue3[100]
Definition postbox.h:74
uint32_t dword7
Definition postbox.h:68
unsigned char * charValue2
Definition postbox.h:73
uint32_t dword8
Definition postbox.h:69
uint32_t * pValue
Definition postbox.h:70
Definition postbox.h:81
struct _postbox_ * prev
Definition postbox.h:89
uint64_t * address
Definition postbox.h:82
uint16_t size
Definition postbox.h:87
uint16_t ownerID
Definition postbox.h:83
int headIdx
Definition postbox.h:84
struct _postbox_ * next
Definition postbox.h:88
bool full
Definition postbox.h:86
int tailIdx
Definition postbox.h:85
TTY * root
Definition tty.cpp:47