lkml.org 
[lkml]   [2005]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] Real-Time Preemption, -RT-2.6.12-rc4-V0.7.47-06
Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
>>agreed - i've added your patch to my tree.
>
> with a small modification: i turned the error into a link-time error,
> because gcc parses both branches and will give a compiler-time warning
> even if the proper compat_semaphore is used.

Oh, sorry. I actually had it produce a link-time error at first. But I
wanted so much to make it fail at compile time that I screwed it up and
didn't test both cases.

However, what you have in RT-V0.7.47-13 is still not correct. Now it
again produces only a warning :-)
Patch attached. This time I really tested it in both cases. For struct
semaphore it fails at link-time. For struct compat_semaphore it compiles
without problems.

Michal
diff -Nurp -X linux-RT/Documentation/dontdiff linux-RT/include/linux/rt_lock.h linux-RT.mich/include/linux/rt_lock.h
--- linux-RT/include/linux/rt_lock.h 2005-05-30 18:40:07.000000000 +0200
+++ linux-RT.mich/include/linux/rt_lock.h 2005-05-30 18:29:53.000000000 +0200
@@ -210,7 +210,7 @@ extern void there_is_no_init_MUTEX_LOCKE
* No locked initialization for RT semaphores
*/
#define rt_init_MUTEX_LOCKED(sem) \
- there_is_no_init_MUTEX_LOCKED_for_RT_semaphores
+ there_is_no_init_MUTEX_LOCKED_for_RT_semaphores()
extern void FASTCALL(rt_down(struct semaphore *sem));
extern int FASTCALL(rt_down_interruptible(struct semaphore *sem));
extern int FASTCALL(rt_down_trylock(struct semaphore *sem));
\
 
 \ /
  Last update: 2005-05-30 18:52    [W:0.083 / U:0.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site