Warnings removal (linuxthreads/*pt-machine.h)
Andreas Jaeger
aj@suse.de
Sun Dec 17 07:40:00 GMT 2000
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.
Andreas
2000-12-17 Andreas Jaeger <aj@suse.de>
* 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 aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-hacker
mailing list