Commit graph

14 commits

Author SHA1 Message Date
David van Moolenbroek
4e00414360 blocktest: make 64-bit native 2013-08-08 17:36:45 +02:00
Ben Gras
456359aa72 retire 64-bit conversion functions
Change-Id: Ib6b81403f877c363a286c654e0524fa1cb781b80
2013-06-24 16:50:57 +02:00
Thomas Cort
e67fc5771d libc: add clock_getres()/clock_gettime() system calls.
In order to make it more clear that ticks should be used for timers
and realtime should be used for timestamps / displaying the date/time,
getuptime() was renamed to getticks() and getuptime2() was renamed to
getuptime().

Servers, drivers, libraries, tests, etc that use getuptime()/getuptime2()
have been updated. In instances where a realtime was calculated, the
calculation was changed to use realtime.

System calls clock_getres() and clock_gettime() were added to PM/libc.
2013-04-04 15:04:53 +02:00
David van Moolenbroek
3be9c7c33b Rename "struct partition" to "struct part_geom"
Change-Id: Ifaf9795ba70f5b933599b2a6ec9415e6bd13200c
2013-03-20 16:14:21 +00:00
David van Moolenbroek
2e26c872c4 blocktest: make fewer assumptions about driver
In particular, allow partial results to be returned in some cases,
and do not require that the driver fail on word-unaligned access.
2012-10-15 11:50:59 +00:00
David van Moolenbroek
c9f644bd68 blocktest: switch from rand() to lrand48()
Apparently, with NetBSD's libc, the exclusive OR of the lower eight
bits of 4096 consecutive rand() values is zero, breaking some tests.
2012-09-10 11:35:04 +02:00
Arne Welzel
4fbdf1946d blocktest: fix segfault on vectored read 2012-09-10 11:32:38 +02:00
Ben Gras
7336a67dfe retire PUBLIC, PRIVATE and FORWARD 2012-03-25 21:58:14 +02:00
David van Moolenbroek
c729ff0050 blocktest: updates for sys_vumap() 2012-03-24 19:51:13 +01:00
David van Moolenbroek
f65e531ee4 blocktest: support for stateless driver restarts 2011-12-11 22:41:51 +01:00
David van Moolenbroek
95d1f25b28 blocktest: resolve label/minor in userland
The test script now resolves the device node into a <label,minor>
pair, so that the blocktest driver itself no longer has to. This
removes blocktest's dependency on VFS' internal data structures.

Also allow blocktest to be linked using with gcc/clang.
2011-12-11 22:35:37 +01:00
David van Moolenbroek
b4d909d415 Split block/character protocols and libdriver
This patch separates the character and block driver communication
protocols. The old character protocol remains the same, but a new
block protocol is introduced. The libdriver library is replaced by
two new libraries: libchardriver and libblockdriver. Their exposed
API, and drivers that use them, have been updated accordingly.
Together, libbdev and libblockdriver now completely abstract away
the message format used by the block protocol. As the memory driver
is both a character and a block device driver, it now implements its
own message loop.

The most important semantic change made to the block protocol is that
it is no longer possible to return both partial results and an error
for a single transfer. This simplifies the interaction between the
caller and the driver, as the I/O vector no longer needs to be copied
back. Also, drivers are now no longer supposed to decide based on the
layout of the I/O vector when a transfer should be cut short. Put
simply, transfers are now supposed to either succeed completely, or
result in an error.

After this patch, the state of the various pieces is as follows:
- block protocol: stable
- libbdev API: stable for synchronous communication
- libblockdriver API: needs slight revision (the drvlib/partition API
  in particular; the threading API will also change shortly)
- character protocol: needs cleanup
- libchardriver API: needs cleanup accordingly
- driver restarts: largely unsupported until endpoint changes are
  reintroduced

As a side effect, this patch eliminates several bugs, hacks, and gcc
-Wall and -W warnings all over the place. It probably introduces a
few new ones, too.

Update warning: this patch changes the protocol between MFS and disk
drivers, so in order to use old/new images, the MFS from the ramdisk
must be used to mount all file systems.
2011-11-23 14:06:37 +01:00
David van Moolenbroek
2602861f23 Move optset.c into libsys; remove redundant copies 2011-11-07 16:16:08 +01:00
David van Moolenbroek
fc34180cca Add "blocktest" test, for testing block drivers
The test is located in test/blocktest. It requires hand-editing of
its configuration, and is not part of any automated test set.
2011-11-07 14:55:55 +01:00