linux-2.6.16.RT.x
如果定义了CONFIG_PREEMPT_RT,那么
struct semaphore {
atomic_t count;
struct rt_mutex lock;
};
struct compat_semaphore {
atomic_t count;
int sleepers;
wait_queue_head_t wait;
};
如果没有定义CONFIG_PREEMPT_RT,那么
# define semaphore compat_semaphore
struct compat_semaphore {
atomic_t count;
int sleepers;
wait_queue_head_t wait;
};
linux-2.6.29.RT.x
如果定义了CONFIG_PREEMPT_RT,那么
struct semaphore {
atomic_t count;
struct rt_mutex lock;
};
#define DECLARE_MUTEX(name) \
struct semaphore name = \
{ .count = { 1 }, .lock = __RT_MUTEX_INITIALIZER(name.lock) }
#define DECLARE_MUTEX_LOCKED(name) \
struct semaphore name = \
{ .count = { 0 }, .lock = __RT_MUTEX_INITIALIZER(name.lock) }
struct compat_semaphore {
spinlock_t lock;
unsigned int count;
struct list_head wait_list;
};
如果没有定义CONFIG_PREEMPT_RT,那么:
没有对semaphore的相关定义
#define compat_semaphore semaphore
因而也没有对compat_semaphore的相关定义
阅读(2131) | 评论(0) | 转发(0) |