L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
fd_store_impl.h
1
/*
2
* (c) 2010 Alexander Warg <warg@os.inf.tu-dresden.de>
3
* economic rights: Technische Universität Dresden (Germany)
4
*
5
* License: see LICENSE.spdx (in this directory or the directories above)
6
*/
7
#include "fd_store.h"
8
9
namespace
L4Re
{
namespace
Core {
10
11
int
12
Fd_store::alloc() noexcept
13
{
14
for
(
int
i = _fd_hint; i < MAX_FILES; ++i)
15
{
16
if
(!_files[i])
17
{
18
_fd_hint = i + 1;
19
return
i;
20
}
21
}
22
23
return
-1;
24
}
25
26
void
27
Fd_store::free(
int
fd)
noexcept
28
{
29
_files[fd] = 0;
30
if
(fd < _fd_hint)
31
_fd_hint = fd;
32
}
33
34
}}
35
L4Re
L4Re C++ Interfaces.
Definition
cmd_control:14
l4
l4re_vfs
impl
fd_store_impl.h
Generated on Fri May 23 2025 13:40:51 for L4Re Operating System Framework by
1.9.8