Remove obsolete attribute macros.

This commit is contained in:
Jonas 'Sortie' Termansen 2013-06-20 14:57:20 +02:00
parent c377f33072
commit a44138f72f
5 changed files with 14 additions and 13 deletions

View File

@ -119,8 +119,11 @@ const uint64_t URPL = 0x3;
// Portable functions for loading registers. // Portable functions for loading registers.
namespace CPU { namespace CPU {
extern "C" void load_registers(InterruptRegisters* regs, size_t size) SORTIX_NORETURN; extern "C" __attribute__((noreturn))
SORTIX_NORETURN inline void LoadRegisters(InterruptRegisters* regs) void load_registers(InterruptRegisters* regs, size_t size);
__attribute__((noreturn))
inline void LoadRegisters(InterruptRegisters* regs)
{ {
load_registers(regs, sizeof(*regs)); load_registers(regs, sizeof(*regs));
} }

View File

@ -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. This file is part of Sortix.
@ -28,9 +28,6 @@
typedef uintptr_t addr_t; 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 likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0) #define unlikely(x) __builtin_expect((x),0)
#define STATIC_ASSERT(condition) static_assert(condition, #condition) #define STATIC_ASSERT(condition) static_assert(condition, #condition)

View File

@ -32,7 +32,7 @@ namespace Sortix {
extern "C" { extern "C" {
inline static void kthread_yield(void) { asm volatile ("int $129"); } 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; typedef unsigned kthread_mutex_t;
const kthread_mutex_t KTHREAD_MUTEX_INITIALIZER = 0; const kthread_mutex_t KTHREAD_MUTEX_INITIALIZER = 0;
unsigned kthread_mutex_trylock(kthread_mutex_t* mutex); unsigned kthread_mutex_trylock(kthread_mutex_t* mutex);

View File

@ -29,10 +29,10 @@ namespace Sortix
{ {
// This function halts the kernel. If you wish to give an error message first, // This function halts the kernel. If you wish to give an error message first,
// then you ought to call Panic instead. // 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" __attribute__((noreturn)) void Panic(const char* Error);
extern "C" void SORTIX_NORETURN PanicF(const char* Format, ...); extern "C" __attribute__((noreturn)) void PanicF(const char* Format, ...);
extern "C" void WaitForInterrupt(); extern "C" void WaitForInterrupt();
} }

View File

@ -42,11 +42,12 @@ extern "C" void KernelInit(unsigned long magic, multiboot_info_t* bootinfo);
typedef void (*ThreadEntry)(void* user); typedef void (*ThreadEntry)(void* user);
// Simply exits the kernel thread. // 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 // Internally used as a kernel thread entry point that exits the thread
// upon the actual thread entry returning. // 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. // These functions create a new kernel process but doesn't start it.
Thread* CreateKernelThread(Process* process, CPU::InterruptRegisters* regs); Thread* CreateKernelThread(Process* process, CPU::InterruptRegisters* regs);
@ -130,7 +131,7 @@ public:
private: private:
void GotoOnSigKill(CPU::InterruptRegisters* regs); void GotoOnSigKill(CPU::InterruptRegisters* regs);
void OnSigKill() SORTIX_NORETURN; __attribute__((noreturn)) void OnSigKill();
void LastPrayer(); void LastPrayer();
void SetHavePendingSignals(); void SetHavePendingSignals();
void HandleSignalFixupRegsCPU(CPU::InterruptRegisters* regs); void HandleSignalFixupRegsCPU(CPU::InterruptRegisters* regs);