This is the mail archive of the mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Warnings removal (linuxthreads/*pt-machine.h)

Compiling glibc gives lots of these warnings:

../linuxthreads/sysdeps/i386/i686/pt-machine.h:36: warning: no previous prototype for `testandset'
../linuxthreads/sysdeps/i386/i686/pt-machine.h:54: warning: no previous prototype for `__compare_and_swap'

What do you think of the appended patch?  

Btw. should testandset return long int like alpha,ia64,mips or int
like arm,hppa,i386,m68k,s390,sh ?  Depending on the answer some
prototypes need be changed.  IMO it should be long int.


2000-12-17  Andreas Jaeger  <>

	* internals.h: Add prototypes for testandset and
	__compare_and_swap to shut up gcc warnings.

Index: linuxthreads/internals.h
--- linuxthreads/internals.h	2000/08/05 06:08:30	1.56
+++ linuxthreads/internals.h	2000/12/17 15:34:20
@@ -27,6 +27,9 @@
 #include <sys/types.h>
 #include <bits/libc-tsd.h> /* for _LIBC_TSD_KEY_N */
+extern int testandset (int *spinlock);
+extern int __compare_and_swap (long int *p, long int oldval, long int newval);
 #include "pt-machine.h"
 #include "semaphore.h"
 #include "../linuxthreads_db/thread_dbP.h"

 Andreas Jaeger
  SuSE Labs

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]