XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
postbox.h File Reference
#include <stdint.h>
#include <Fs/vfs.h>
Include dependency graph for postbox.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _post_event_
 
struct  _postbox_
 

Macros

#define POSTBOX_CREATE   401
 
#define POSTBOX_DESTROY   402
 
#define POSTBOX_PUT_EVENT   403
 
#define POSTBOX_GET_EVENT   404
 
#define POSTBOX_CREATE_ROOT   405
 
#define POSTBOX_GET_EVENT_ROOT   406
 
#define POSTBOX_NO_EVENT   -1
 
#define POSTBOX_ROOT_ID   1
 

Typedefs

typedef struct _post_event_ PostEvent
 
typedef struct _postbox_ PostBox
 

Functions

void AuIPCPostBoxInitialise ()
 AuIPCPostBoxInitialise – initialise the post box ipc manager.
 
void PostBoxPutEvent (PostEvent *event)
 PostBoxPutEvent – put an event to a specific post box.
 
AuVFSNodeAuPostBOXGetNode ()
 
void PostBoxCreate (bool root, uint16_t tid)
 PostBoxCreate – creates a postbox.
 
void PostBoxDestroyByID (uint16_t id)
 PostBoxDestroyByID – destroys a post box identified by an id.
 
int PostBoxIOControl (AuVFSNode *file, int code, void *arg)
 PostBoxIOControl – I/O Control function for post box manager.
 

Detailed Description

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

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.

Macro Definition Documentation

◆ POSTBOX_CREATE

#define POSTBOX_CREATE   401

◆ POSTBOX_CREATE_ROOT

#define POSTBOX_CREATE_ROOT   405

◆ POSTBOX_DESTROY

#define POSTBOX_DESTROY   402

◆ POSTBOX_GET_EVENT

#define POSTBOX_GET_EVENT   404

◆ POSTBOX_GET_EVENT_ROOT

#define POSTBOX_GET_EVENT_ROOT   406

◆ POSTBOX_NO_EVENT

#define POSTBOX_NO_EVENT   -1

◆ POSTBOX_PUT_EVENT

#define POSTBOX_PUT_EVENT   403

◆ POSTBOX_ROOT_ID

#define POSTBOX_ROOT_ID   1

Typedef Documentation

◆ PostBox

typedef struct _postbox_ PostBox

◆ PostEvent

typedef struct _post_event_ PostEvent

Function Documentation

◆ AuIPCPostBoxInitialise()

void AuIPCPostBoxInitialise ( )
extern

AuIPCPostBoxInitialise – initialise the post box ipc manager.

create the postbox file

I dont know, but the sixth item in the device fs list is the postbox file node, but miraculously 6th item disappers from the list when opened from user space that's why we are creating a dummy node in the dev list

◆ AuPostBOXGetNode()

AuVFSNode * AuPostBOXGetNode ( )
extern

◆ PostBoxCreate()

void PostBoxCreate ( bool  root,
uint16_t  tid 
)
extern

PostBoxCreate – creates a postbox.

Parameters
root– is this post box root ?
tid– thread id

◆ PostBoxDestroyByID()

void PostBoxDestroyByID ( uint16_t  id)
extern

PostBoxDestroyByID – destroys a post box identified by an id.

Parameters
id– id of the postbox

◆ PostBoxIOControl()

int PostBoxIOControl ( AuVFSNode file,
int  code,
void *  arg 
)
extern

PostBoxIOControl – I/O Control function for post box manager.

Parameters
file– Pointer to postbox file
code– Post Box command
arg– extra data

◆ PostBoxPutEvent()

void PostBoxPutEvent ( PostEvent event)
extern

PostBoxPutEvent – put an event to a specific post box.

Parameters
event– Event to put