1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 177 unchanged lines hidden (view full) ---

186
187// Rather than creating a shared_ptr instance and assigning it nullptr,
188// we just create an alias.
189constexpr decltype(nullptr) NoFault = nullptr;
190
191struct AtomicOpFunctor
192{
193 virtual void operator()(uint8_t *p) = 0;
194 virtual AtomicOpFunctor* clone() = 0;
195 virtual ~AtomicOpFunctor() {}
196};
197
198template <class T>
199struct TypedAtomicOpFunctor : public AtomicOpFunctor
200{
201 void operator()(uint8_t *p) { execute((T *)p); }
202 virtual AtomicOpFunctor* clone() = 0;
203 virtual void execute(T * p) = 0;
204};
205
206enum ByteOrder {
207 BigEndianByteOrder,
208 LittleEndianByteOrder
209};
210
211#endif // __BASE_TYPES_HH__