From 381fabd29ace5e0641102caba65ecf213e6fe554 Mon Sep 17 00:00:00 2001
From: Petr Shumilov
Date: Mon, 28 Oct 2024 16:53:07 +0300
Subject: [PATCH] Fix code style
Signed-off-by: Petr Shumilov
---
common/ucontext/darwin/aarch64/context.cpp | 4 ++--
common/ucontext/darwin/aarch64/context.h | 4 ++--
common/ucontext/linux/aarch64/context.h | 6 +++++-
common/ucontext/linux/x86_64/context.h | 4 ++++
common/ucontext/linux/x86_64/defs.h | 6 +++++-
common/ucontext/linux/x86_64/getcontext.S | 6 +++++-
common/ucontext/linux/x86_64/makecontext.cpp | 6 +++++-
common/ucontext/linux/x86_64/setcontext.S | 5 ++++-
common/ucontext/linux/x86_64/startcontext.S | 4 ++++
common/ucontext/linux/x86_64/swapcontext.S | 6 ++++--
common/ucontext/ucontext-portable-test.cpp | 4 ++--
common/ucontext/ucontext-portable.h | 2 +-
12 files changed, 43 insertions(+), 14 deletions(-)
diff --git a/common/ucontext/darwin/aarch64/context.cpp b/common/ucontext/darwin/aarch64/context.cpp
index 685de4b820..efde034c2a 100644
--- a/common/ucontext/darwin/aarch64/context.cpp
+++ b/common/ucontext/darwin/aarch64/context.cpp
@@ -1,6 +1,6 @@
// Compiler for PHP (aka KPHP)
// libucontext (c) https://github.com/kaniini/libucontext/tree/master (copied as third-party and slightly modified)
-// Copyright (c) 2023 LLC «V Kontakte»
+// Copyright (c) 2024 LLC «V Kontakte»
// Distributed under the GPL v3 License, see LICENSE.notice.txt
#include "context.h"
@@ -182,4 +182,4 @@ asm(".global " NAME(swapcontext_portable) ";\n"
"bl " NAME(setcontext_portable) "\n"
/* hmm, we came back here try to return */
"mov x30, x28\n"
- "ret\n");
\ No newline at end of file
+ "ret\n");
diff --git a/common/ucontext/darwin/aarch64/context.h b/common/ucontext/darwin/aarch64/context.h
index b12341c1cd..4a132e5a89 100644
--- a/common/ucontext/darwin/aarch64/context.h
+++ b/common/ucontext/darwin/aarch64/context.h
@@ -1,7 +1,7 @@
// Compiler for PHP (aka KPHP)
// Copyright (c) 2018-2022 Ariadne Conill
// https://github.com/kaniini/libucontext/tree/master (copied as third-party and slightly modified)
-// Copyright (c) 2023 LLC «V Kontakte»
+// Copyright (c) 2024 LLC «V Kontakte»
// Distributed under the GPL v3 License, see LICENSE.notice.txt
#pragma once
@@ -51,4 +51,4 @@ inline constexpr void set_context_link_portable(libucontext_ucontext &ctx, libuc
inline void *get_context_stack_base_ptr_portable(const libucontext_ucontext &ctx) noexcept {
return reinterpret_cast(ctx.uc_mcontext.fp);
-}
\ No newline at end of file
+}
diff --git a/common/ucontext/linux/aarch64/context.h b/common/ucontext/linux/aarch64/context.h
index 010e9e7dbe..a14c811563 100644
--- a/common/ucontext/linux/aarch64/context.h
+++ b/common/ucontext/linux/aarch64/context.h
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#include
inline constexpr void *get_context_stack_ptr_portable(const ucontext_t &ctx) noexcept {
@@ -23,4 +27,4 @@ inline constexpr void set_context_link_portable(ucontext_t &ctx, ucontext_t *lin
inline void *get_context_stack_base_ptr_portable(const ucontext_t &ctx) noexcept {
// 29 -- Frame Pointer, based on AArch64 spec
return reinterpret_cast(ctx.uc_mcontext.regs[29]);
-}
\ No newline at end of file
+}
diff --git a/common/ucontext/linux/x86_64/context.h b/common/ucontext/linux/x86_64/context.h
index 7801b76f2d..7010437b60 100644
--- a/common/ucontext/linux/x86_64/context.h
+++ b/common/ucontext/linux/x86_64/context.h
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#include
#include
#include "defs.h"
diff --git a/common/ucontext/linux/x86_64/defs.h b/common/ucontext/linux/x86_64/defs.h
index ec0c0449c5..606f76e641 100644
--- a/common/ucontext/linux/x86_64/defs.h
+++ b/common/ucontext/linux/x86_64/defs.h
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#ifndef TYPE
# ifdef __clang__
# define TYPE(name) // .type not supported
@@ -98,4 +102,4 @@
#define oEFL KCONTEXT_MCONTEXT_GREG_OFFSET(GREG_EFL)
#define oFPREGS KCONTEXT_MCONTEXT_FPREGS
#define oFPREGSMEM KCONTEXT_FPREGS_MEM
-#define oMXCSR KCONTEXT_FPREGS_MEM_MXCSR
\ No newline at end of file
+#define oMXCSR KCONTEXT_FPREGS_MEM_MXCSR
diff --git a/common/ucontext/linux/x86_64/getcontext.S b/common/ucontext/linux/x86_64/getcontext.S
index 1baed5248e..bdf4059894 100644
--- a/common/ucontext/linux/x86_64/getcontext.S
+++ b/common/ucontext/linux/x86_64/getcontext.S
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#include "defs.h"
/*
@@ -50,4 +54,4 @@ ENTRY(getcontext_portable)
// All done, return 0 for success
xorl %eax, %eax
ret
-END(getcontext_portable)
\ No newline at end of file
+END(getcontext_portable)
diff --git a/common/ucontext/linux/x86_64/makecontext.cpp b/common/ucontext/linux/x86_64/makecontext.cpp
index 3f86820a92..b88944a4a5 100644
--- a/common/ucontext/linux/x86_64/makecontext.cpp
+++ b/common/ucontext/linux/x86_64/makecontext.cpp
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#include "context.h"
#include
#include
@@ -74,4 +78,4 @@ extern "C" void makecontext_portable(kcontext_t *kcp, void (*func)(void), int ar
break;
}
va_end(ap);
-}
\ No newline at end of file
+}
diff --git a/common/ucontext/linux/x86_64/setcontext.S b/common/ucontext/linux/x86_64/setcontext.S
index ec12b7df8c..e8ad02205b 100644
--- a/common/ucontext/linux/x86_64/setcontext.S
+++ b/common/ucontext/linux/x86_64/setcontext.S
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#include "defs.h"
/*
@@ -45,4 +49,3 @@ ENTRY(setcontext_portable)
xorl %eax, %eax
ret
END(setcontext_portable)
-
diff --git a/common/ucontext/linux/x86_64/startcontext.S b/common/ucontext/linux/x86_64/startcontext.S
index 01db662596..f5e6c129f1 100644
--- a/common/ucontext/linux/x86_64/startcontext.S
+++ b/common/ucontext/linux/x86_64/startcontext.S
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#include "defs.h"
/*
diff --git a/common/ucontext/linux/x86_64/swapcontext.S b/common/ucontext/linux/x86_64/swapcontext.S
index 633bb767dd..255e5fb19d 100644
--- a/common/ucontext/linux/x86_64/swapcontext.S
+++ b/common/ucontext/linux/x86_64/swapcontext.S
@@ -1,3 +1,7 @@
+// Compiler for PHP (aka KPHP)
+// Copyright (c) 2024 LLC «V Kontakte»
+// Distributed under the GPL v3 License, see LICENSE.notice.txt
+
#include "defs.h"
/*
@@ -82,5 +86,3 @@ ENTRY(swapcontext_portable)
xorl %eax, %eax
ret
END(swapcontext_portable)
-
-
diff --git a/common/ucontext/ucontext-portable-test.cpp b/common/ucontext/ucontext-portable-test.cpp
index 01c4ed734d..45806988f6 100644
--- a/common/ucontext/ucontext-portable-test.cpp
+++ b/common/ucontext/ucontext-portable-test.cpp
@@ -1,5 +1,5 @@
// Compiler for PHP (aka KPHP)
-// Copyright (c) 2020 LLC «V Kontakte»
+// Copyright (c) 2024 LLC «V Kontakte»
// Distributed under the GPL v3 License, see LICENSE.notice.txt
#include
@@ -65,4 +65,4 @@ TEST(ucontext_portable, get_and_setcontext) {
setcontext_portable(&ctx3);
}
ASSERT_EQ(context_set_cnt, 10);
-}
\ No newline at end of file
+}
diff --git a/common/ucontext/ucontext-portable.h b/common/ucontext/ucontext-portable.h
index cfe3060de3..97880d3578 100644
--- a/common/ucontext/ucontext-portable.h
+++ b/common/ucontext/ucontext-portable.h
@@ -1,5 +1,5 @@
// Compiler for PHP (aka KPHP)
-// Copyright (c) 2021 LLC «V Kontakte»
+// Copyright (c) 2024 LLC «V Kontakte»
// Distributed under the GPL v3 License, see LICENSE.notice.txt
#pragma once