OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
omnisci_fs.h
Go to the documentation of this file.
1 /*
2  * Copyright 2020 OmniSci, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #include <stddef.h>
20 
21 namespace omnisci {
22 
23 size_t file_size(const int fd);
24 
25 void* checked_mmap(const int fd, const size_t sz);
26 
27 void checked_munmap(void* addr, size_t length);
28 
29 int msync(void* addr, size_t length, bool async);
30 
31 int fsync(int fd);
32 
33 int open(const char* path, int flags, int mode);
34 
35 void close(const int fd);
36 
37 int get_page_size();
38 
39 } // namespace omnisci
int open(const char *path, int flags, int mode)
Definition: omnisci_fs.cpp:64
void * checked_mmap(const int fd, const size_t sz)
Definition: omnisci_fs.cpp:38
void close(const int fd)
Definition: omnisci_fs.cpp:68
int fsync(int fd)
Definition: omnisci_fs.cpp:60
int msync(void *addr, size_t length, bool async)
Definition: omnisci_fs.cpp:55
void checked_munmap(void *addr, size_t length)
Definition: omnisci_fs.cpp:51
int get_page_size()
Definition: omnisci_fs.cpp:27
size_t file_size(const int fd)
Definition: omnisci_fs.cpp:31