forked from genodelabs/genode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: libc: make Sync object accessible
Issue genodelabs#5302
- Loading branch information
Showing
3 changed files
with
95 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* \brief File synchronization interface | ||
* \author Benjamin Lamowski | ||
* \date 2024-07-16 | ||
*/ | ||
|
||
/* | ||
* Copyright (C) 2024 Genode Labs GmbH | ||
* | ||
* This file is part of the Genode OS framework, which is distributed | ||
* under the terms of the GNU Affero General Public License version 3. | ||
*/ | ||
|
||
#ifndef _LIBC__INTERNAL__SYNC_H_ | ||
#define _LIBC__INTERNAL__SYNC_H_ | ||
|
||
/* libc-internal includes */ | ||
#include <internal/init.h> | ||
#include <internal/plugin.h> | ||
#include <internal/vfs_plugin.h> | ||
|
||
namespace Libc { | ||
class Sync | ||
{ | ||
private: | ||
enum { INITIAL, TIMESTAMP_UPDATED, QUEUED, COMPLETE } _state { INITIAL }; | ||
|
||
Vfs::Vfs_handle &_vfs_handle; | ||
Vfs::Timestamp _mtime { Vfs::Timestamp::INVALID }; | ||
|
||
public: | ||
Sync(Vfs::Vfs_handle &vfs_handle, Libc::Vfs_plugin::Update_mtime update_mtime, | ||
Libc::Current_real_time ¤t_real_time); | ||
|
||
Sync(Vfs::Vfs_handle &vfs_handle, Plugin & plugin); | ||
|
||
bool complete(); | ||
}; | ||
} | ||
|
||
#endif /* _LIBC__INTERNAL__SYNC_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters