Sadly, none of the standard headers include a proper prototype for the
gettid() system call, but we need it for the private version of
alloc-instantiate-race.  Our current method of getting it - invoking
the _syscall0 macro doesn't work on all systems.  This patch
implements a more robust approach, using the syscall() library
function.

Signed-off-by: David Gibson <[EMAIL PROTECTED]>

Index: libhugetlbfs/tests/alloc-instantiate-race.c
===================================================================
--- libhugetlbfs.orig/tests/alloc-instantiate-race.c    2006-10-31 
11:40:00.000000000 +1100
+++ libhugetlbfs/tests/alloc-instantiate-race.c 2006-10-31 11:40:43.000000000 
+1100
@@ -49,7 +49,10 @@
 
 #include "hugetests.h"
 
-_syscall0(pid_t, gettid);
+pid_t gettid(void)
+{
+       return syscall(__NR_gettid);
+}
 
 static int hpage_size;
 static pid_t child1, child2;

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to