Atomic increment/decrement
Deborah Goldsmith <[email protected]> Tue, 16 Nov 2004 16:11:40 -0800
| Newsgroups | gmane.comp.lib.icu.general |
|---|---|
| Message-ID | <[email protected]> |
I'd like to have umutex.c take advantage of built-in atomic increment/decrement functions on Darwin. The Darwin-specificity can be taken care of by using a U_DARWIN conditional compile. The sticky issue is that they are not available on all versions of Darwin (just as ICU has new functions added each release). On top of that, Darwin does not have a global "version of Darwin" preprocessor variable defined. So it looks like this will require adding something to configure_in to test for the presence of these particular functions, or ICU won't compile on a version of Darwin lacking these functions. Beyond that, does there need to be a runtime test, to allow a version of ICU built on a version of Darwin that has the functions, to run on a version of Darwin that doesn't have the functions? In general ICU doesn't seem to go that far in terms of testing for availability: it only checks for what's on the system you're building on. Apple doesn't particularly have a need for this, either: for us it's OK for a version of ICU built on Darwin version A to only run on A or later. I'd be curious to hear people's thoughts on the best way of doing this. I already had a private exchange with Steven about this. Deborah