|
XenevaOS
|
#include <Ipc\postbox.h>#include <Mm\kmalloc.h>#include <Mm\pmmngr.h>#include <Mm\vmmngr.h>#include <string.h>#include <_null.h>#include <Hal\x86_64_sched.h>#include <Fs\vfs.h>#include <Fs\dev\devfs.h>#include <Hal\x86_64_hal.h>#include <Hal\serial.h>
Macros | |
| #define | POSTEVENT_ALIGN 8 |
| #define | POSTEVENT_SIZE_ALIGNED (((sizeof(PostEvent) + (POSTEVENT_ALIGN - 1)) / POSTEVENT_ALIGN) * POSTEVENT_ALIGN) |
Functions | |
| void | PostBoxAdvanceIndex (PostBox *box) |
| void | PostBoxRetreat (PostBox *box) |
| bool | IsPostBoxEmpty (PostBox *box) |
| bool | IsPostBoxFull (PostBox *box) |
| void | PostBoxCreate (bool root, uint16_t tid) |
| PostBoxCreate – creates a postbox. | |
| void | PostBoxDestroy (PostBox *box) |
| void | PostBoxDestroyByID (uint16_t id) |
| PostBoxDestroyByID – destroys a post box identified by an id. | |
| void | PostBoxPutEvent (PostEvent *event) |
| PostBoxPutEvent – put an event to a specific post box. | |
| int | PostBoxGetEvent (PostEvent *event, bool root, AuThread *curr_thread) |
| int | PostBoxIOControl (AuVFSNode *file, int code, void *arg) |
| PostBoxIOControl – I/O Control function for post box manager. | |
| void | AuIPCPostBoxInitialise () |
| AuIPCPostBoxInitialise – initialise the post box ipc manager. | |
Variables | |
| PostBox * | firstBox |
| PostBox * | lastBox |
| bool | _PostBoxRootCreated |
| #define POSTEVENT_ALIGN 8 |
BSD 2-Clause License
Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define POSTEVENT_SIZE_ALIGNED (((sizeof(PostEvent) + (POSTEVENT_ALIGN - 1)) / POSTEVENT_ALIGN) * POSTEVENT_ALIGN) |
| void AuIPCPostBoxInitialise | ( | ) |
AuIPCPostBoxInitialise – initialise the post box ipc manager.
| void PostBoxAdvanceIndex | ( | PostBox * | box | ) |
PostBoxCreate – creates a postbox.
| root | – is this post box root ? |
| tid | – thread id |
| void PostBoxDestroy | ( | PostBox * | box | ) |
| void PostBoxDestroyByID | ( | uint16_t | id | ) |
PostBoxDestroyByID – destroys a post box identified by an id.
| id | – id of the postbox |
| int PostBoxIOControl | ( | AuVFSNode * | file, |
| int | code, | ||
| void * | arg | ||
| ) |
PostBoxIOControl – I/O Control function for post box manager.
| file | – Pointer to postbox file |
| code | – Post Box command |
| arg | – extra data |
| void PostBoxPutEvent | ( | PostEvent * | event | ) |
PostBoxPutEvent – put an event to a specific post box.
| event | – Event to put |
| void PostBoxRetreat | ( | PostBox * | box | ) |
| bool _PostBoxRootCreated |
| PostBox* firstBox |
| PostBox* lastBox |