1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

Everywhere: void arguments to C functions

Problem:
- C functions with no arguments require a single `void` in the argument list.

Solution:
- Put the `void` in the argument list of functions in C header files.
This commit is contained in:
Lenny Maiorani 2020-12-24 08:41:54 -07:00 committed by Andreas Kling
parent b990fc5d3a
commit b2316701a8
14 changed files with 29 additions and 29 deletions

View file

@ -64,9 +64,9 @@ static GenericInterruptHandler* s_interrupt_handler[GENERIC_INTERRUPT_HANDLERS_C
extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread);
extern "C" void context_first_init(Thread* from_thread, Thread* to_thread, TrapFrame* trap);
extern "C" u32 do_init_context(Thread* thread, u32 flags);
extern "C" void exit_kernel_thread();
extern "C" void pre_init_finished();
extern "C" void post_init_finished();
extern "C" void exit_kernel_thread(void);
extern "C" void pre_init_finished(void);
extern "C" void post_init_finished(void);
extern "C" void handle_interrupt(TrapFrame*);
#define EH_ENTRY(ec, title) \
@ -1514,7 +1514,7 @@ extern "C" void context_first_init([[maybe_unused]] Thread* from_thread, [[maybe
Scheduler::leave_on_first_switch(trap->regs->eflags);
}
extern "C" void thread_context_first_enter();
extern "C" void thread_context_first_enter(void);
asm(
// enter_thread_context returns to here first time a thread is executing
".globl thread_context_first_enter \n"
@ -1530,7 +1530,7 @@ asm(
" jmp common_trap_exit \n"
);
void exit_kernel_thread()
void exit_kernel_thread(void)
{
Thread::current()->exit();
}
@ -1675,7 +1675,7 @@ void Processor::assume_context(Thread& thread, u32 flags)
ASSERT_NOT_REACHED();
}
extern "C" void pre_init_finished()
extern "C" void pre_init_finished(void)
{
ASSERT(g_scheduler_lock.own_lock());
@ -1688,7 +1688,7 @@ extern "C" void pre_init_finished()
Scheduler::leave_on_first_switch(prev_flags);
}
extern "C" void post_init_finished()
extern "C" void post_init_finished(void)
{
// We need to re-acquire the scheduler lock before a context switch
// transfers control into the idle loop, which needs the lock held

View file

@ -210,7 +210,7 @@ void APIC::write_icr(const ICRReg& icr)
#define APIC_LVT_TRIGGER_LEVEL (1 << 14)
#define APIC_LVT(iv, dm) (((iv)&0xff) | (((dm)&0x7) << 8))
extern "C" void apic_ap_start();
extern "C" void apic_ap_start(void);
extern "C" u16 apic_ap_start_size;
extern "C" u32 ap_cpu_init_stacks;
extern "C" u32 ap_cpu_init_processor_info_array;

View file

@ -425,8 +425,8 @@ void signal_trampoline_dummy()
".att_syntax" ::"i"(Syscall::SC_sigreturn));
}
extern "C" void asm_signal_trampoline();
extern "C" void asm_signal_trampoline_end();
extern "C" void asm_signal_trampoline(void);
extern "C" void asm_signal_trampoline_end(void);
void create_signal_trampolines()
{