1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-20 01:30:59 +00:00
serenity/Kernel
Ben Wiederhake 42b057b0c9 Kernel: Mark compilation-unit-only functions as static
This enables a nice warning in case a function becomes dead code. Also, in case
of signal_trampoline_dummy, marking it external (non-static) prevents it from
being 'optimized away', which would lead to surprising and weird linker errors.

I found these places by using -Wmissing-declarations.

The Kernel still shows these issues, which I think are false-positives,
but don't want to touch:
- Kernel/Arch/i386/CPU.cpp:1081:17: void Kernel::enter_thread_context(Kernel::Thread*, Kernel::Thread*)
- Kernel/Arch/i386/CPU.cpp:1170:17: void Kernel::context_first_init(Kernel::Thread*, Kernel::Thread*, Kernel::TrapFrame*)
- Kernel/Arch/i386/CPU.cpp:1304:16: u32 Kernel::do_init_context(Kernel::Thread*, u32)
- Kernel/Arch/i386/CPU.cpp:1347:17: void Kernel::pre_init_finished()
- Kernel/Arch/i386/CPU.cpp:1360:17: void Kernel::post_init_finished()
	No idea, not gonna touch it.
- Kernel/init.cpp:104:30: void Kernel::init()
- Kernel/init.cpp:167:30: void Kernel::init_ap(u32, Kernel::Processor*)
- Kernel/init.cpp:184:17: void Kernel::init_finished(u32)
	Called by boot.S.
- Kernel/init.cpp:383:16: int Kernel::__cxa_atexit(void (*)(void*), void*, void*)
- Kernel/StdLib.cpp:285:19: void __cxa_pure_virtual()
- Kernel/StdLib.cpp:300:19: void __stack_chk_fail()
- Kernel/StdLib.cpp:305:19: void __stack_chk_fail_local()
	Not sure how to tell the compiler that the compiler is already using them.
	Also, maybe __cxa_atexit should go into StdLib.cpp?
- Kernel/Modules/TestModule.cpp:31:17: void module_init()
- Kernel/Modules/TestModule.cpp:40:17: void module_fini()
	Could maybe go into a new header. This would also provide type-checking for new modules.
2020-08-12 20:40:59 +02:00
..
ACPI Kernel: Add SMP IPI support 2020-07-06 17:07:44 +02:00
API Kernel: Forward declare struct stat in the syscall API header 2020-08-11 20:29:14 +02:00
Arch Kernel: Prevent recursive calls into the scheduler 2020-08-02 17:15:11 +02:00
Devices Kernel+LibKeyboard: Store the keymap name when setting system keymap 2020-08-06 17:45:06 +02:00
FileSystem Kernel: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
Heap Kernel: Include the 128 byte slab allocator in for_each_allocator 2020-08-10 20:05:18 +02:00
Interrupts Kernel: Mark MSIHandler as final 2020-08-10 09:57:50 +02:00
Modules Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Net Kernel: Use Userspace<T> for the bind syscall, and implementation 2020-08-10 12:52:15 +02:00
PCI Kernel: Add SMP IPI support 2020-07-06 17:07:44 +02:00
Syscalls Kernel: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
Tasks Kernel: Require a reason to be passed to Thread::wait_on 2020-07-06 10:00:24 +02:00
Time Kernel: Use map_typed() in HPET code and add a register access helper 2020-06-21 00:58:55 +02:00
TTY Kernel: PID/PGID typing 2020-08-10 11:51:45 +02:00
VM AK: Fix overflow and mixed-signedness issues in binary_search() (#2961) 2020-08-02 21:10:35 +02:00
.gitignore Meta: Removed all gitignore in the source tree only keeping the root one 2019-06-30 10:41:26 +02:00
Assertions.h Kernel: List all CPUs in /proc/cpuinfo 2020-07-01 12:07:01 +02:00
CMakeLists.txt Kernel: Invoke heap constructors separately early on 2020-08-10 20:05:18 +02:00
CMOS.cpp Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
CMOS.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
CommandLine.cpp Kernel: Remove CommandLine::get() in favor of lookup() 2020-04-18 14:22:42 +02:00
CommandLine.h Kernel: Remove CommandLine::get() in favor of lookup() 2020-04-18 14:22:42 +02:00
Console.cpp Kernel: Make File::write() and File::read() return KResultOr<size_t> 2020-08-04 18:17:16 +02:00
Console.h Kernel: Make File::write() and File::read() return KResultOr<size_t> 2020-08-04 18:17:16 +02:00
DoubleBuffer.cpp Kernel: Make File::write() and File::read() return KResultOr<size_t> 2020-08-04 18:17:16 +02:00
DoubleBuffer.h Kernel: Make File::write() and File::read() return KResultOr<size_t> 2020-08-04 18:17:16 +02:00
Forward.h Kernel: Prevent recursive calls into the scheduler 2020-08-02 17:15:11 +02:00
init.cpp Kernel: Invoke heap constructors separately early on 2020-08-10 20:05:18 +02:00
IO.h Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
KBuffer.h Kernel: Make Inode::read_entire() return a KBuffer (not ByteBuffer) 2020-08-11 20:29:14 +02:00
KBufferBuilder.cpp Kernel: Fix KBufferBuilder::append() 2020-07-05 12:26:27 +02:00
KBufferBuilder.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
kprintf.cpp Kernel: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
KResult.h Kernel: Decorate KResult and KResultOr<T> methods with [[nodiscard]] 2020-08-09 00:13:39 +02:00
kstdio.h LibELF+Lagom: Work towards getting LibELF in Lagom 2020-08-09 21:12:54 +02:00
KSyms.cpp Kernel: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
KSyms.h Kernel: Update cryptically-named functions related to symbolication 2020-04-08 17:19:46 +02:00
linker.ld Kernel: Invoke heap constructors separately early on 2020-08-10 20:05:18 +02:00
Lock.cpp Kernel: Add SMP IPI support 2020-07-06 17:07:44 +02:00
Lock.h AK: Add ALWAYS_INLINE, NEVER_INLINE and FLATTEN macros 2020-04-30 11:43:25 +02:00
mkmap.sh Build: Switch to CMake :^) 2020-05-14 20:15:18 +02:00
Module.h Kernel: Move all code into the Kernel namespace 2020-02-16 01:27:42 +01:00
Multiboot.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
PerformanceEventBuffer.cpp Kernel: PID/TID typing 2020-08-10 11:51:45 +02:00
PerformanceEventBuffer.h Kernel: PID/TID typing 2020-08-10 11:51:45 +02:00
PhysicalAddress.h Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
Process.cpp Kernel: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
Process.h Kernel: Use Userspace<T> for the exit_thread syscall 2020-08-10 12:52:15 +02:00
Profiling.cpp Kernel: More PID/TID typing 2020-08-10 11:51:45 +02:00
Profiling.h Kernel: More PID/TID typing 2020-08-10 11:51:45 +02:00
Ptrace.cpp Kernel: More PID/TID typing 2020-08-10 11:51:45 +02:00
Ptrace.h Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
Random.cpp Kernel: Require a reason to be passed to Thread::wait_on 2020-07-06 10:00:24 +02:00
Random.h LibCrypto+LibTLS+Kernel: Switch the Cipher::Mode interface to use Span 2020-08-11 21:37:10 +02:00
RTC.cpp Kernel: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
RTC.h Meta: Add license header to source files 2020-01-18 09:45:54 +01:00
Scheduler.cpp Kernel: Always return from Thread::wait_on 2020-08-11 14:54:36 +02:00
Scheduler.h Kernel: Fix a few Thread::block related races 2020-08-03 15:59:11 +02:00
SharedBuffer.cpp Kernel: PID/TID typing 2020-08-10 11:51:45 +02:00
SharedBuffer.h Kernel: PID/TID typing 2020-08-10 11:51:45 +02:00
SpinLock.h Kernel: Simplify the ScopedSpinLock template 2020-07-30 23:43:37 +02:00
StdLib.cpp Kernel+LibC: Implement 'memmem' 2020-08-01 08:39:26 +02:00
StdLib.h Kernel+LibC: Implement 'memmem' 2020-08-01 08:39:26 +02:00
Syscall.cpp Kernel: Use Userspace<T> for the exit_thread syscall 2020-08-10 12:52:15 +02:00
Thread.cpp Kernel: Mark compilation-unit-only functions as static 2020-08-12 20:40:59 +02:00
Thread.h Kernel: Always return from Thread::wait_on 2020-08-11 14:54:36 +02:00
ThreadTracer.cpp Kernel: PID/TID typing 2020-08-10 11:51:45 +02:00
ThreadTracer.h Kernel: PID/TID typing 2020-08-10 11:51:45 +02:00
TimerQueue.cpp Kernel: Update TimerQueue next due timer only when necessary 2020-04-27 11:24:21 +02:00
TimerQueue.h Kernel: Expose timers via a TimerId type 2020-04-27 11:14:41 +02:00
UnixTypes.h Kernel: PID/TID typing 2020-08-10 11:51:45 +02:00
VirtualAddress.h Kernel: Absorb LibBareMetal back into the kernel 2020-05-16 12:00:04 +02:00
WaitQueue.cpp Kernel: Dequeue dying threads from WaitQueue 2020-08-06 10:02:55 +02:00
WaitQueue.h Kernel: Dequeue dying threads from WaitQueue 2020-08-06 10:02:55 +02:00