Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 322927

Summary: Update profiler native code to build properly on newer Linux distributions
Product: z_Archived Reporter: Jonathan West <jgwest>
Component: TPTPAssignee: Jonathan West <jgwest>
Status: CLOSED FIXED QA Contact: Kathy Chan <kathy>
Severity: minor    
Priority: P3 CC: jgwest, mikereid
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch for bug 322927
none
Patch for bug 322927 - Linux's ThreadSync.cpp none

Description Jonathan West CLA 2010-08-17 12:24:40 EDT
The profiler native code currently runs on all Linux platforms, but does not build on newer Linux platforms (e.g. Ubuntu 10.04). This is due to compiler changes in more recent builds of GCC. Fix is to explicitly add standard library #includes, where needed.
Comment 1 Jonathan West CLA 2010-08-17 12:36:11 EDT
Created attachment 176810 [details]
Patch for bug 322927
Comment 2 Jonathan West CLA 2010-08-17 12:54:36 EDT
Patch checked into HEAD.
Comment 3 Mike Reid CLA 2010-08-17 13:08:20 EDT
May I suggest we use:

+    pthread_mutexattr_init(&attr);
+    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);

instead of explicitly referring to attr.__align?

This is the official pthreads API way, and builds on old and new linuxes alike, so the TPTP_NEWER_LINUX define is also not needed.
Comment 4 Jonathan West CLA 2010-08-18 11:00:02 EDT
Created attachment 176900 [details]
Patch for bug 322927 - Linux's ThreadSync.cpp
Comment 5 Jonathan West CLA 2010-08-18 11:01:21 EDT
Second patch checked into HEAD. Thanks Mike!
Comment 6 Kathy Chan CLA 2010-08-24 11:19:46 EDT
Can this defect be resolved since the patches had been checked into CVS already?
Comment 7 Jonathan West CLA 2010-08-24 15:15:21 EDT
Resolving.
Comment 8 Kathy Chan CLA 2011-02-11 13:45:41 EST
This defect had been resolved as FIXED for more than 1 month.  Please verify with the latest TPTP 4.7.2 driver.  If this defect is still left unverified by February 25, we'll close it on the originator's behalf.

TPTP 4.7.2 driver can be downloaded from:

http://www.eclipse.org/tptp/home/downloads/?ver=4.7.2
Comment 9 Jonathan West CLA 2011-04-01 14:20:38 EDT
Closing.