assert: fix __assert_fail()

This patch changes the definition of __assert_fail() in api/assert.h which
would allow it and other header files which include it (such as debug.hh) to
be used in mgmt submodules. Fixes conflict with declaration of
__assert_fail() in external/x64/glibc.bin/usr/include/assert.h

Signed-off-by: Jaspal Singh Dhillon <jaspal.iiith@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
aarch64: mmu: remove spurious include

remove a spurious include <osv/prio.hh> which seems to be
a merge artifact.

Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
VFS: cleanup readdir() and friends

Our readdir_r() and friends were implemented in libc/dir.cc, calling
a function "ll_readdir()" from fs/vfs/main.cc. The name of this function
was confusing ("ll_" seemed to imply lock-less, which it isn't), and the way
it was "extern"ed was ugly, as a comment even admitted.

Moreover, when we want to implement more missing functions like rewinddir()
(see issue #77), we need to write more of these silly "ll_*" wrapper functions.

Instead, let's just move the few dir.cc functions into main.cc. The latter
already defines most of our filesystem system calls, so feels the right
place anyway. This change allows us to get rid of the silly ll_readdir()
layer, and makes implementing rewinddir() trivial (see next patch).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
VFS: implement rewinddir(), telldir(), seekdir()

Implement three of the Linux functions we're still missing (see issue #77
for a list of more things to do).

These are pretty easy to add, because we just need to correctly call the
lower layer functions, sys_*, which already exist.

This patch also adds tests for the three functions to tst-readdir.cc.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>