Commit 80a8a1e7 authored by Marc Vef's avatar Marc Vef
Browse files

Further restructuring and cleanup of preload lib

parent b9958e5f
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
#ifndef IFS_ADAFS_FUNCTIONS_HPP
#define IFS_ADAFS_FUNCTIONS_HPP

#include <preload/preload_util.hpp>

int adafs_open(const std::string& path, mode_t mode, int flags);

int adafs_stat(const std::string& path, struct stat* buf);

int adafs_stat64(const std::string& path, struct stat64* buf);

ssize_t adafs_pread_ws(int fd, void* buf, size_t count, off_t offset);

ssize_t adafs_pwrite_ws(int fd, const void* buf, size_t count, off_t offset);


#endif //IFS_ADAFS_FUNCTIONS_HPP
+3 −1
Original line number Diff line number Diff line
@@ -2,7 +2,9 @@
#ifndef IFS_OPEN_FILE_MAP_HPP
#define IFS_OPEN_FILE_MAP_HPP

#include <preload/preload.hpp>
#include <map>
#include <mutex>
#include <memory>

class OpenFile {
private:
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ extern void* libc_puts;

extern void* libc_write;
extern void* libc_pwrite;
extern void* libc_pwrite64;
extern void* libc_read;
extern void* libc_pread;
extern void* libc_pread64;
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ extern "C" {

#include <preload/preload_util.hpp>

#define EUNKNOWN -1
#define EUNKNOWN (-1)

bool ld_is_env_initialized();

+3 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
#define IFS_PRELOAD_UTIL_HPP

#include <preload/preload.hpp>
#include <preload/open_file_map.hpp>
// third party libs
#include <extern/spdlog/spdlog.h>
#include <extern/lrucache/LRUCache11.hpp>
@@ -61,6 +62,8 @@ struct MetadentryUpdateFlags {
    bool path = false;
};

// file map instance for mapping paths to file descriptors
extern OpenFileMap file_map;
// Margo instances
extern margo_instance_id ld_margo_ipc_id;
extern margo_instance_id ld_margo_rpc_id;
Loading