| From: |
| Thomas Weber <tweber@de.ibm.com> |
| To: |
| raybry@sgi.com |
| Subject: |
| [PATCH 2/2] lockmeter for s390 |
| Date: |
| Wed, 08 Dec 2004 11:22:44 +0100 |
| Cc: |
| akpm@osdl.org, lse-tech@lists.sourceforge.net |
| Archive-link: |
| Article,
Thread
|
The s390 lockmeter patch is split into two parts, because I also had to
make a change in the common part of lockmeter.h.
__builtin_return_address(0) does not work properly on a 31-bit s390
platform.
__builtin_extract_return_addr(__builtin_return_address(0)) solves this
issue and is a used throughout the glibc code for example.
This should work as well for all other platforms.
====================================================
--- include/linux/lockmeter.h 2004-11-15 13:37:46.545171516 +0100
+++ lockmeter.h 2004-11-11 09:29:35.000000000 +0100
@@ -75,8 +75,8 @@ int lstat_update_time(void*, void*, int,
#define LSTAT_RA_SEMA 2 /* RESERVED */
#define LSTAT_RA_WRITE 3 /* write lock statistics*/
-#define LSTAT_RA(n) \
- ((void*)( ((unsigned long)__builtin_return_address(0) & ~3) | n) )
+#define LSTAT_RA(n) \
+ ((void*)( ((unsigned
long)__builtin_extract_return_addr(__builtin_return_address(0)) & ~3) | n) )
/*
* Constants used for lock addresses in the lstat_directory
====================================================
Regards,
Thomas Weber, IBM Germany
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/