harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject [drlvm] uses deprecated pthread function
Date Tue, 25 Jul 2006 21:12:17 GMT

I've tried to build drlvm on Linux and it didn't compile because when 
compiling signals_ia32.cpp file compiler produced a warning that 
pthread_attr_getstackaddr is deprecated. I looked in /usr/include/pthread.h 
[1] and found out that it is really deprecated by __attribute_deprecated__.

I don't know why everything is fine for others but for me gcc [2] does gives a 
warning on this function. I used the recommended replacement 
pthread_attr_getstack which gives both address and stack size in one call. 
The patch is in HARMONY-977. StackTest and other vm smoke tests pass for me 

Maybe it would be better to call pthread_attr_getstack just once since it 
provides all necessary stack information and eliminate redundant 
find_stack_addr and find_stack_size. Each of them calls pthread_getattr_np 
just to destroy pthread_attr 2 lines later. But I made the minimal fix which 
doesn't change functions layout because the same functions exist for windows. 
Probably they are meant to be moved to portlib?

For the future reference, to avoid warnings about deprecated functions (which 
isn't really good IMHO) it is necessary to 
specify -Wno-deprecated-declarations, not the -Wno-deprecated (it is meant 
for C++ code only) option which we currently have in 

GNU C Library stable release version 2.3.6, by Roland McGrath et al.
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
Compiled by GNU CC version 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9).
Compiled on a Linux 2.6.11 system on 2006-06-25.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        Native POSIX Threads Library by Ulrich Drepper et al
        The C stubs add-on version 2.1.2.
        GNU Libidn by Simon Josefsson
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.

gcc (GCC) 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)

Gregory Shimansky, Intel Middleware Products Division

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message