From eefc813bc7424112708992dfbf24def73c92f5de Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Fri, 15 Aug 2014 20:55:19 +0200 Subject: Remove static initializer macros These initializers are unnecessary, unused, and cumbersome to maintain. --- kern/condition.h | 3 --- kern/list.h | 5 ----- kern/mutex.h | 3 --- kern/rbtree.h | 5 ----- kern/spinlock.h | 2 -- 5 files changed, 18 deletions(-) diff --git a/kern/condition.h b/kern/condition.h index 9cd581a9..3de39be2 100644 --- a/kern/condition.h +++ b/kern/condition.h @@ -29,9 +29,6 @@ struct condition; -#define CONDITION_INITIALIZER(condition) \ - { SPINLOCK_INITIALIZER, NULL, LIST_INITIALIZER((condition).waiters) } - static inline void condition_init(struct condition *condition) { diff --git a/kern/list.h b/kern/list.h index 29ecfcb4..e64f5fd9 100644 --- a/kern/list.h +++ b/kern/list.h @@ -39,11 +39,6 @@ struct list { struct list *next; }; -/* - * Static list initializer. - */ -#define LIST_INITIALIZER(list) { &(list), &(list) } - /* * Initialize a list. */ diff --git a/kern/mutex.h b/kern/mutex.h index 011f7033..d3fe74b5 100644 --- a/kern/mutex.h +++ b/kern/mutex.h @@ -31,9 +31,6 @@ struct mutex; -#define MUTEX_INITIALIZER(mutex) \ - { MUTEX_UNLOCKED, SPINLOCK_INITIALIZER, LIST_INITIALIZER((mutex).waiters) } - static inline void mutex_init(struct mutex *mutex) { diff --git a/kern/rbtree.h b/kern/rbtree.h index 6de1871d..740c8194 100644 --- a/kern/rbtree.h +++ b/kern/rbtree.h @@ -41,11 +41,6 @@ struct rbtree_node; */ struct rbtree; -/* - * Static tree initializer. - */ -#define RBTREE_INITIALIZER { NULL } - #include /* diff --git a/kern/spinlock.h b/kern/spinlock.h index 8e67df3f..1cc9b08f 100644 --- a/kern/spinlock.h +++ b/kern/spinlock.h @@ -32,8 +32,6 @@ struct spinlock; -#define SPINLOCK_INITIALIZER { 0 } - static inline void spinlock_init(struct spinlock *lock) { -- cgit v1.2.3