lkml.org 
[lkml]   [1999]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] little fix for the new recorsive semaphores
It will make no difference because the kstack should be always 4byte
aligned but it looks more clean to me ;).

Index: linux/include/asm/semaphore.h
===================================================================
RCS file: /var/cvs/linux/include/asm-i386/semaphore.h,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 semaphore.h
--- semaphore.h 1999/01/18 13:56:40 1.1.2.2
+++ linux/include/asm-i386/semaphore.h 1999/01/18 22:52:34
@@ -62,7 +62,7 @@
* operation into the slow path.
*/
#define semaphore_owner(sem) \
- ((struct task_struct *)((2*PAGE_MASK) & (sem)->owner))
+ ((struct task_struct *)(((PAGE_SIZE<<1)-1) & (sem)->owner))

#define MUTEX ((struct semaphore) { ATOMIC_INIT(1), 0, 0, 0, NULL })
#define MUTEX_LOCKED ((struct semaphore) { ATOMIC_INIT(0), 0, 1, 0, NULL })

Andrea Arcangeli


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.060 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site