NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
disk_helper.h File Reference

Disk access helper class. More...

#include "nul/service_disk.h"

Functions

template<class C >
 alloc_cap ()
 Disk access helper class.
 assert (diskconsumer)
if(res) Logging unsigned read_write_synch (bool read, unsigned disknum, uint64 start_sector, size_t size)
unsigned read_synch (unsigned disknum, uint64 start_secotr, size_t size)
unsigned write_synch (unsigned disknum, uint64 start_secotr, size_t size)
template<class C , unsigned S>
char DiskHelper< C, S >
::disk_buffer[S
ALIGNED (0x1000)

Variables

KernelSemaphoresem = new KernelSemaphore(sem_cap, true)
DiskProtocol::DiskConsumerdiskconsumer = new (1<<12) DiskProtocol::DiskConsumer()
 res

Detailed Description

Disk access helper class.

Copyright (C) 2012, Michal Sojka sojka.nosp@m.@os..nosp@m.inf.t.nosp@m.u-dr.nosp@m.esden.nosp@m..de Economic rights: Technische Universitaet Dresden (Germany)

This file is part of NUL (NOVA user land).

NUL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

NUL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License version 2 for more details.

Function Documentation

template<class C , unsigned S>
char DiskHelper<C,S>::disk_buffer [S] ALIGNED ( 0x1000  )
template<class C >
alloc_cap ( )

Disk access helper class.

It encapsulates disk DMA buffer and provides synchronous read operation.

assert ( diskconsumer  )
unsigned read_synch ( unsigned  disknum,
uint64  start_secotr,
size_t  size 
)
if (res) Logging unsigned read_write_synch ( bool  read,
unsigned  disknum,
uint64  start_sector,
size_t  size 
)
unsigned write_synch ( unsigned  disknum,
uint64  start_secotr,
size_t  size 
)

Variable Documentation

res
Initial value:
attach(*BaseProgram::myutcb(), disk_buffer, sizeof(disk_buffer), tmp_cap,
KernelSemaphore* sem = new KernelSemaphore(sem_cap, true)