On 28 January 2014 18:12, Peter Maydell <peter.mayd...@linaro.org> wrote: > typedef enum CPAccessResult { > /* Access is permitted */ > CP_ACCESS_OK = 0, > /* Access fails due to a configurable trap or enable which would > * result in an exception syndrome other than 'uncategorized' > */ > CP_ACCESS_TRAP = 1, > /* Access fails and should result in an exception syndrome of > * 'uncategorized' > */ > CP_ACCESS_TRAP = 2, > } CPAccessResult;
The =2 case should be some other name, of course. I'd rather not use the obvious "CP_ACCESS_UNCATEGORIZED" because that implies "use this if you don't know", when actually the set of things which cause Uncategorized exceptions is a specific list, and it's the 'due to a configurable trap' case which is defined as "all those which aren't defined to cause an Uncategorized exception". On the other hand I can't come up with a better name right now... thanks -- PMM