diff options
| author | Jake Mannens <jake72360@gmail.com> | 2018-08-22 06:00:39 +1000 |
|---|---|---|
| committer | Jake Mannens <jake72360@gmail.com> | 2018-08-22 06:00:39 +1000 |
| commit | dafb5464fe8b9a3f8ff41de233f9ff6cd21162ea (patch) | |
| tree | 21e45b1d2910d34f673ea9a6676ff09cbc1c0ddd /include/time.h | |
| parent | 228de16e2976abb9a15edb41c9b10dbfd309481f (diff) | |
Added the header file limits.h which contains one definition for
SSIZE_MAX which is needed to limit the number of bytes read() will
transfer.
Laid the foundation for a TTY subsystem. This works by taking the
previously used buffer and r/w pointers concept and implements it as a
'tty_queue' struct. The struct 'tty_struct' is used to represent a TTY
device. This struct currently contains three elements; a read queue for
data flowing from the device to the user, a write queue for data flowing
from the user to the device and a function pointer to an init function.
The latter element will reduce complexity by allowing the TTY subsystem
to initialize each TTY device driver (when it's ready), rather than each
driver having to be initialized during bootup. Each TTY device is
implemented as a pointer to a tty_struct. The structures are defined
separately by each driver as well as tracked and maintained by pointers
in the table 'ttys' in tty.c.
Modified the RS232 serial driver to make use of the new TTY subsystem
for transferring data to the user. Currently, write calls are still
handled manually through the rsputs() function though this will change
in future.
Modified the read() system call to direct read calls to the TTY
subsystem which will further direct the call to the appropriate TTY
device driver.
The serial driver's interrupt routine now uses the wake_up() function to
wake processes blocking for serial data. This is to ensure the scheduler
is notified of the wakeup. This function is the preferred method for
waking processes since accessing the task state field directly may not
be possible in the future and is discouraged. The reason for this is
that the scheduler's behaviour may change to require being notified of
task wakeup events in the future.
Diffstat (limited to 'include/time.h')
0 files changed, 0 insertions, 0 deletions
