mirror of
https://github.com/usatiuk/ficus.git
synced 2025-10-29 00:27:52 +01:00
Tweak clang-format to not align across empty lines
That should fix insane function declarations
This commit is contained in:
@@ -4,19 +4,19 @@ AccessModifierOffset: -4
|
|||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveAssignments:
|
AlignConsecutiveAssignments:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: false
|
AcrossComments: false
|
||||||
AlignConsecutiveBitFields:
|
AlignConsecutiveBitFields:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: true
|
AcrossComments: false
|
||||||
AlignConsecutiveDeclarations:
|
AlignConsecutiveDeclarations:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: false
|
AcrossComments: false
|
||||||
AlignConsecutiveMacros:
|
AlignConsecutiveMacros:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
AcrossEmptyLines: true
|
AcrossEmptyLines: false
|
||||||
AcrossComments: false
|
AcrossComments: false
|
||||||
AlignTrailingComments:
|
AlignTrailingComments:
|
||||||
Kind: Always
|
Kind: Always
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#define PAGE_ROUND_UP(x) ((((uintptr_t) (x)) + PAGE_SIZE - 1) & (~(PAGE_SIZE - 1)))
|
#define PAGE_ROUND_UP(x) ((((uintptr_t) (x)) + PAGE_SIZE - 1) & (~(PAGE_SIZE - 1)))
|
||||||
|
|
||||||
#define KERN_V2P(a) ((((uintptr_t) (a) - (uintptr_t) kernel_virt_base) + (uintptr_t) kernel_phys_base))
|
#define KERN_V2P(a) ((((uintptr_t) (a) - (uintptr_t) kernel_virt_base) + (uintptr_t) kernel_phys_base))
|
||||||
#define KERN_P2V(a) ((((uintptr_t) (a) -kernel_phys_base) | kernel_virt_base))
|
#define KERN_P2V(a) ((((uintptr_t) (a) - kernel_phys_base) | kernel_virt_base))
|
||||||
|
|
||||||
#define HHDM_BEGIN 0xfffff80000000000ULL
|
#define HHDM_BEGIN 0xfffff80000000000ULL
|
||||||
#define HHDM_SIZE 32ULL // In GB
|
#define HHDM_SIZE 32ULL // In GB
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
[[nodiscard]] uint64_t used_time() const { return _used_time; }
|
[[nodiscard]] uint64_t used_time() const { return _used_time; }
|
||||||
[[nodiscard]] TaskState state() const { return _state; }
|
[[nodiscard]] TaskState state() const { return _state; }
|
||||||
|
|
||||||
~ Task();
|
~Task();
|
||||||
|
|
||||||
Task *clone();
|
Task *clone();
|
||||||
void user_setup();
|
void user_setup();
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ public:
|
|||||||
void *mmap_mem(void *v_addr, size_t length, int prot, int flags);
|
void *mmap_mem(void *v_addr, size_t length, int prot, int flags);
|
||||||
int munmap(void *addr, size_t length);
|
int munmap(void *addr, size_t length);
|
||||||
|
|
||||||
static constexpr size_t kBrkSize = 16ULL*1024ULL*1024ULL;
|
static constexpr size_t kBrkSize = 16ULL * 1024ULL * 1024ULL;
|
||||||
std::optional<char*> brk_start;
|
std::optional<char *> brk_start;
|
||||||
std::optional<char*> brk_end_fake;
|
std::optional<char *> brk_end_fake;
|
||||||
std::optional<char*> brk_end_real;
|
std::optional<char *> brk_end_real;
|
||||||
|
|
||||||
void clone_from(const VMA& vma);
|
void clone_from(const VMA &vma);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AddressSpace *space = nullptr;
|
AddressSpace *space = nullptr;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public:
|
|||||||
|
|
||||||
explicit UniquePtr(T *data) : ptr(data) {}
|
explicit UniquePtr(T *data) : ptr(data) {}
|
||||||
|
|
||||||
~ UniquePtr() {
|
~UniquePtr() {
|
||||||
if (ptr == nullptr) return;
|
if (ptr == nullptr) return;
|
||||||
delete ptr;
|
delete ptr;
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ public:
|
|||||||
explicit SharedPtr(T *data) : _ptr(data), _base(new SharedPtr_Base{SharedPtr_Base::UsesBlock{1, 1}}) {}
|
explicit SharedPtr(T *data) : _ptr(data), _base(new SharedPtr_Base{SharedPtr_Base::UsesBlock{1, 1}}) {}
|
||||||
SharedPtr(std::nullptr_t a_nullptr) : _ptr(nullptr), _base(nullptr) {}
|
SharedPtr(std::nullptr_t a_nullptr) : _ptr(nullptr), _base(nullptr) {}
|
||||||
|
|
||||||
~ SharedPtr() {
|
~SharedPtr() {
|
||||||
unref();
|
unref();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
~ COWPointer() = default;
|
~COWPointer() = default;
|
||||||
|
|
||||||
T *get() const {
|
T *get() const {
|
||||||
return ptr.get();
|
return ptr.get();
|
||||||
|
|||||||
Reference in New Issue
Block a user