aboutsummaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authoraavdonkin <aavdonkin@yandex-team.ru>2022-02-10 16:49:57 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:57 +0300
commitefc32853c4263131bc59412eaf1a9e4aaae2a1f9 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system
parentfc8d3fe40009fab7705035e6ffdc3eb334307c80 (diff)
downloadydb-efc32853c4263131bc59412eaf1a9e4aaae2a1f9.tar.gz
Restoring authorship annotation for <aavdonkin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system')
-rw-r--r--util/system/event.cpp4
-rw-r--r--util/system/file.cpp58
-rw-r--r--util/system/file.h6
-rw-r--r--util/system/filemap.h4
-rw-r--r--util/system/flock.h2
5 files changed, 37 insertions, 37 deletions
diff --git a/util/system/event.cpp b/util/system/event.cpp
index 3784f686ff..79b3cdb291 100644
--- a/util/system/event.cpp
+++ b/util/system/event.cpp
@@ -130,8 +130,8 @@ void TSystemEvent::Reset() noexcept {
void TSystemEvent::Signal() noexcept {
EvImpl_->Signal();
-}
-
+}
+
bool TSystemEvent::WaitD(TInstant deadLine) noexcept {
return EvImpl_->WaitD(deadLine);
}
diff --git a/util/system/file.cpp b/util/system/file.cpp
index 9edd8a82f2..4a261d020c 100644
--- a/util/system/file.cpp
+++ b/util/system/file.cpp
@@ -626,7 +626,7 @@ int TFileHandle::Flock(int op) noexcept {
}
bool TFileHandle::SetDirect() {
-#ifdef _linux_
+#ifdef _linux_
const long flags = fcntl(Fd_, F_GETFL);
const int r = fcntl(Fd_, F_SETFL, flags | O_DIRECT);
@@ -634,15 +634,15 @@ bool TFileHandle::SetDirect() {
#endif
return false;
-}
-
-void TFileHandle::ResetDirect() {
-#ifdef _linux_
- long flags = fcntl(Fd_, F_GETFL);
- fcntl(Fd_, F_SETFL, flags & ~O_DIRECT);
-#endif
-}
-
+}
+
+void TFileHandle::ResetDirect() {
+#ifdef _linux_
+ long flags = fcntl(Fd_, F_GETFL);
+ fcntl(Fd_, F_SETFL, flags & ~O_DIRECT);
+#endif
+}
+
i64 TFileHandle::CountCache(i64 offset, i64 length) const noexcept {
#ifdef _linux_
const i64 pageSize = NSystemInfo::GetPageSize();
@@ -940,8 +940,8 @@ public:
i32 RawRead(void* bufferIn, size_t numBytes) {
const size_t toRead = Min(MaxReadPortion, numBytes);
return Handle_.Read(bufferIn, toRead);
- }
-
+ }
+
size_t ReadOrFail(void* buf, size_t numBytes) {
const i32 reallyRead = RawRead(buf, numBytes);
@@ -1054,16 +1054,16 @@ public:
}
}
- void SetDirect() {
+ void SetDirect() {
if (!Handle_.SetDirect()) {
ythrow TFileError() << "can't set direct mode for " << FileName_.Quote();
}
- }
-
- void ResetDirect() {
- Handle_.ResetDirect();
- }
-
+ }
+
+ void ResetDirect() {
+ Handle_.ResetDirect();
+ }
+
i64 CountCache(i64 offset, i64 length) const noexcept {
return Handle_.CountCache(offset, length);
}
@@ -1173,8 +1173,8 @@ size_t TFile::Read(void* buf, size_t len) {
i32 TFile::RawRead(void* buf, size_t len) {
return Impl_->RawRead(buf, len);
-}
-
+}
+
size_t TFile::ReadOrFail(void* buf, size_t len) {
return Impl_->ReadOrFail(buf, len);
}
@@ -1207,14 +1207,14 @@ void TFile::Flock(int op) {
Impl_->Flock(op);
}
-void TFile::SetDirect() {
- Impl_->SetDirect();
-}
-
-void TFile::ResetDirect() {
- Impl_->ResetDirect();
-}
-
+void TFile::SetDirect() {
+ Impl_->SetDirect();
+}
+
+void TFile::ResetDirect() {
+ Impl_->ResetDirect();
+}
+
i64 TFile::CountCache(i64 offset, i64 length) const noexcept {
return Impl_->CountCache(offset, length);
}
diff --git a/util/system/file.h b/util/system/file.h
index 8b6086343c..9502e159b6 100644
--- a/util/system/file.h
+++ b/util/system/file.h
@@ -127,7 +127,7 @@ public:
//very low-level methods
bool SetDirect();
- void ResetDirect();
+ void ResetDirect();
/* Manual file cache management, length = 0 means "as much as possible" */
@@ -197,8 +197,8 @@ public:
void Flock(int op);
//do not use, their meaning very platform-dependant
- void SetDirect();
- void ResetDirect();
+ void SetDirect();
+ void ResetDirect();
/* Manual file cache management, length = 0 means "as much as possible" */
diff --git a/util/system/filemap.h b/util/system/filemap.h
index 46c10dd897..11be64bff4 100644
--- a/util/system/filemap.h
+++ b/util/system/filemap.h
@@ -314,7 +314,7 @@ public:
char* End() const noexcept {
return Begin() + MappedSize();
}
- size_t MappedSize() const {
+ size_t MappedSize() const {
return Size_;
}
void swap(TMappedAllocation& with);
@@ -342,7 +342,7 @@ public:
}
T* Create(size_t siz) {
Y_ASSERT(MappedSize() == 0 && Ptr() == nullptr);
- T* arr = (T*)Alloc((sizeof(T) * siz));
+ T* arr = (T*)Alloc((sizeof(T) * siz));
if (!arr)
return nullptr;
Y_ASSERT(MappedSize() == sizeof(T) * siz);
diff --git a/util/system/flock.h b/util/system/flock.h
index 4441cad955..797b1970a1 100644
--- a/util/system/flock.h
+++ b/util/system/flock.h
@@ -14,7 +14,7 @@ static inline int Flock(int fd, int op) {
}
#else // not _unix_
-
+
#ifdef __cplusplus
extern "C" {
#endif