mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Remove obsolete attribute macros.
This commit is contained in:
parent
c377f33072
commit
a44138f72f
5 changed files with 14 additions and 13 deletions
|
@ -119,8 +119,11 @@ const uint64_t URPL = 0x3;
|
|||
|
||||
// Portable functions for loading registers.
|
||||
namespace CPU {
|
||||
extern "C" void load_registers(InterruptRegisters* regs, size_t size) SORTIX_NORETURN;
|
||||
SORTIX_NORETURN inline void LoadRegisters(InterruptRegisters* regs)
|
||||
extern "C" __attribute__((noreturn))
|
||||
void load_registers(InterruptRegisters* regs, size_t size);
|
||||
|
||||
__attribute__((noreturn))
|
||||
inline void LoadRegisters(InterruptRegisters* regs)
|
||||
{
|
||||
load_registers(regs, sizeof(*regs));
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
|
||||
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012.
|
||||
Copyright(C) Jonas 'Sortie' Termansen 2011, 2012, 2013.
|
||||
|
||||
This file is part of Sortix.
|
||||
|
||||
|
@ -28,9 +28,6 @@
|
|||
|
||||
typedef uintptr_t addr_t;
|
||||
|
||||
#define SORTIX_NORETURN __attribute__((noreturn))
|
||||
#define SORTIX_MAYALIAS __attribute__((__may_alias__))
|
||||
#define SORTIX_PACKED __attribute__((packed))
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
#define STATIC_ASSERT(condition) static_assert(condition, #condition)
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Sortix {
|
|||
extern "C" {
|
||||
|
||||
inline static void kthread_yield(void) { asm volatile ("int $129"); }
|
||||
void kthread_exit(void* param = NULL) SORTIX_NORETURN;
|
||||
__attribute__((noreturn)) void kthread_exit(void* param = NULL);
|
||||
typedef unsigned kthread_mutex_t;
|
||||
const kthread_mutex_t KTHREAD_MUTEX_INITIALIZER = 0;
|
||||
unsigned kthread_mutex_trylock(kthread_mutex_t* mutex);
|
||||
|
|
|
@ -29,10 +29,10 @@ namespace Sortix
|
|||
{
|
||||
// This function halts the kernel. If you wish to give an error message first,
|
||||
// then you ought to call Panic instead.
|
||||
extern "C" void SORTIX_NORETURN HaltKernel();
|
||||
extern "C" __attribute__((noreturn)) void HaltKernel();
|
||||
|
||||
extern "C" void SORTIX_NORETURN Panic(const char* Error);
|
||||
extern "C" void SORTIX_NORETURN PanicF(const char* Format, ...);
|
||||
extern "C" __attribute__((noreturn)) void Panic(const char* Error);
|
||||
extern "C" __attribute__((noreturn)) void PanicF(const char* Format, ...);
|
||||
extern "C" void WaitForInterrupt();
|
||||
}
|
||||
|
||||
|
|
|
@ -42,11 +42,12 @@ extern "C" void KernelInit(unsigned long magic, multiboot_info_t* bootinfo);
|
|||
typedef void (*ThreadEntry)(void* user);
|
||||
|
||||
// Simply exits the kernel thread.
|
||||
void KernelThreadExit() SORTIX_NORETURN;
|
||||
__attribute__((noreturn)) void KernelThreadExit();
|
||||
|
||||
// Internally used as a kernel thread entry point that exits the thread
|
||||
// upon the actual thread entry returning.
|
||||
extern "C" void BootstrapKernelThread(void* user, ThreadEntry entry) SORTIX_NORETURN;
|
||||
extern "C" __attribute__((noreturn))
|
||||
void BootstrapKernelThread(void* user, ThreadEntry entry);
|
||||
|
||||
// These functions create a new kernel process but doesn't start it.
|
||||
Thread* CreateKernelThread(Process* process, CPU::InterruptRegisters* regs);
|
||||
|
@ -130,7 +131,7 @@ public:
|
|||
|
||||
private:
|
||||
void GotoOnSigKill(CPU::InterruptRegisters* regs);
|
||||
void OnSigKill() SORTIX_NORETURN;
|
||||
__attribute__((noreturn)) void OnSigKill();
|
||||
void LastPrayer();
|
||||
void SetHavePendingSignals();
|
||||
void HandleSignalFixupRegsCPU(CPU::InterruptRegisters* regs);
|
||||
|
|
Loading…
Add table
Reference in a new issue