XenevaOS
Loading...
Searching...
No Matches
Functions | Variables
tty.cpp File Reference
#include <Fs\tty.h>
#include <Fs\vfs.h>
#include <Fs\dev\devfs.h>
#include <_null.h>
#include <Mm\kmalloc.h>
#include <string.h>
#include <stdio.h>
#include <Hal\x86_64_sched.h>
#include <process.h>
#include <Hal\x86_64_signal.h>
#include <Hal\x86_64_hal.h>
#include <Hal\serial.h>
#include <aucon.h>
Include dependency graph for tty.cpp:

Functions

void AuTTYInsert (TTY *tty)
 
void AuTTYDelete (TTY *tty)
 
void AuTTYWriteSlave (TTY *tty, uint8_t c)
 
void AuTTYWriteMaster (TTY *tty, uint8_t c)
 
void AuTTYProcessLine (TTY *tty, uint8_t c)
 
size_t AuTTYMasterRead (AuVFSNode *fs, AuVFSNode *file, uint64_t *buffer, uint32_t len)
 
size_t AuTTYMasterWrite (AuVFSNode *fs, AuVFSNode *file, uint64_t *buffer, uint32_t len)
 
size_t AuTTYSlaveRead (AuVFSNode *fsys, AuVFSNode *file, uint64_t *buffer, uint32_t len)
 
size_t AuTTYSlaveWrite (AuVFSNode *fsys, AuVFSNode *file, uint64_t *buffer, uint32_t len)
 
int AuTTYSlaveClose (AuVFSNode *fs, AuVFSNode *file)
 
int AuTTYMasterClose (AuVFSNode *fs, AuVFSNode *file)
 
int AuTTYIoControl (AuVFSNode *file, int code, void *arg)
 
AuVFSNodeAuTTYCreateMaster (TTY *tty)
 
AuVFSNodeAuTTYCreateSlave (TTY *tty)
 
int AuTTYCreate (int *master_fd, int *slave_fd)
 AuTTYCreate – create tty syscall for process.
 
void AuTTYInitialise ()
 AuTTYInitialise – initialize the TTY kernel resource.
 

Variables

size_t master_count = 0
 
size_t slave_count = 0
 
TTYroot = NULL
 
TTYlast = NULL
 

Function Documentation

◆ AuTTYCreate()

int AuTTYCreate ( int *  master_fd,
int *  slave_fd 
)

AuTTYCreate – create tty syscall for process.

Parameters
master_fd– Pointer to memory area where to store master file descriptor
slave_fd– Pointer to memory area where to store slave file descriptor

◆ AuTTYCreateMaster()

AuVFSNode * AuTTYCreateMaster ( TTY tty)

◆ AuTTYCreateSlave()

AuVFSNode * AuTTYCreateSlave ( TTY tty)

◆ AuTTYDelete()

void AuTTYDelete ( TTY tty)

◆ AuTTYInitialise()

void AuTTYInitialise ( )

AuTTYInitialise – initialize the TTY kernel resource.

◆ AuTTYInsert()

void AuTTYInsert ( TTY tty)

◆ AuTTYIoControl()

int AuTTYIoControl ( AuVFSNode file,
int  code,
void *  arg 
)

◆ AuTTYMasterClose()

int AuTTYMasterClose ( AuVFSNode fs,
AuVFSNode file 
)

◆ AuTTYMasterRead()

size_t AuTTYMasterRead ( AuVFSNode fs,
AuVFSNode file,
uint64_t buffer,
uint32_t  len 
)

◆ AuTTYMasterWrite()

size_t AuTTYMasterWrite ( AuVFSNode fs,
AuVFSNode file,
uint64_t buffer,
uint32_t  len 
)

◆ AuTTYProcessLine()

void AuTTYProcessLine ( TTY tty,
uint8_t  c 
)

◆ AuTTYSlaveClose()

int AuTTYSlaveClose ( AuVFSNode fs,
AuVFSNode file 
)

◆ AuTTYSlaveRead()

size_t AuTTYSlaveRead ( AuVFSNode fsys,
AuVFSNode file,
uint64_t buffer,
uint32_t  len 
)

◆ AuTTYSlaveWrite()

size_t AuTTYSlaveWrite ( AuVFSNode fsys,
AuVFSNode file,
uint64_t buffer,
uint32_t  len 
)

◆ AuTTYWriteMaster()

void AuTTYWriteMaster ( TTY tty,
uint8_t  c 
)

◆ AuTTYWriteSlave()

void AuTTYWriteSlave ( TTY tty,
uint8_t  c 
)

Variable Documentation

◆ last

TTY* last = NULL

◆ master_count

size_t master_count = 0

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.

◆ root

TTY* root = NULL

◆ slave_count

size_t slave_count = 0