Closed Bug 594738 Opened 14 years ago Closed 14 years ago

Use Interlocked* functions for PR_ATOMIC_* macros on mingw.

Categories

(NSPR :: NSPR, defect, P2)

x86
Windows XP
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jacek, Assigned: wtc)

References

Details

Attachments

(2 files)

Attached patch fix v1.0Splinter Review
There is no reason to not use it. I've changed #ifdef to use it on everything but old msvc. It seems righ to expect all hypothetical windows compilers to support Interlocked* functions.
Attachment #473492 - Attachment is patch: true
Attachment #473492 - Flags: review?(wtc)
Comment on attachment 473492 [details] [diff] [review] fix v1.0 r=wtc. The new ifdef is fine because we only support Visual C++ and MinGW GCC on Windows. So we just need to make sure all versions of MinGW GCC we care about support _Interlocked* functions.
Attachment #473492 - Flags: review?(wtc) → review+
Status: NEW → ASSIGNED
Keywords: checkin-needed
OS: Windows XP → Windows 7
Priority: -- → P2
Target Milestone: --- → 4.8.7
OS: Windows 7 → Windows XP
This needs approval to land on mozilla-central, I think.
Keywords: checkin-needed
Patch checked in on the NSPR trunk (NSPR 4.8.7). Checking in pratom.h; /cvsroot/mozilla/nsprpub/pr/include/pratom.h,v <-- pratom.h new revision: 3.17; previous revision: 3.16 done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Put the function declarations before the #pragma intrinsic statements, as the MSDN sample code does: http://msdn.microsoft.com/en-us/library/f24ya7ct(VS.71).aspx I think this will fix the MSVC 7.1 compilation error reported in bug 617903.
Attachment #496524 - Flags: review?(kaie)
I confirm this fixes the build issue seen in bug 617903
Comment on attachment 496524 [details] [diff] [review] Fix MSVC 7.1 compilation errors r=kaie because it works for me
Attachment #496524 - Flags: review?(kaie) → review+
Kai: thank you for testing my patch. It also fixed the build error in Sun's NSS tinderbox "goride". Can you create the NSPR_4_8_7_BETA2 tag and push it to mozilla-central? I checked in the patch on the NSPR trunk (NSPR 4.8.7). Checking in pratom.h; /cvsroot/mozilla/nsprpub/pr/include/pratom.h,v <-- pratom.h new revision: 3.18; previous revision: 3.17 done
(In reply to comment #8) > Kai: thank you for testing my patch. Wan-Teh, thank you for your quick work on this problem. > It also fixed the > build error in Sun's NSS tinderbox "goride". Yes, it looks like it did. Although we don't see green yet, the build cycle has now been much much longer already, which means it most likely no longer runs into this failure. > Can you create the NSPR_4_8_7_BETA2 tag and push > it to mozilla-central? Done. When I did, I noticed that some additional files changed. But after I pushed to mozilla-central, I noticed, the other changes weren't content changes, there were file permission changes (weird!). http://hg.mozilla.org/mozilla-central/rev/eeb76ce515d9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: