Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions CoreFoundation/Collections.subproj/CFStorage.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,8 @@
#endif

#if DEPLOYMENT_TARGET_WINDOWS
// No C99 support
#define restrict

// Replace bzero
#define bzero(dst, size) ZeroMemory(dst, size)

#endif

#if !defined(PAGE_SIZE)
Expand Down Expand Up @@ -250,7 +246,7 @@ static inline void __CFStorageSetChild(CFStorageNode *parentNode, CFIndex childI
__CFAssignWithWriteBarrier((void **)&parentNode->info.notLeaf.child[childIndex], newChild);
}

static inline void __CFStorageGetChildren(const CFStorageNode *parent, CFStorageNode ** restrict resultArray, bool shouldRetain, bool shouldFreeze) {
static inline void __CFStorageGetChildren(const CFStorageNode *parent, CFStorageNode ** __restrict resultArray, bool shouldRetain, bool shouldFreeze) {
ASSERT(! parent->isLeaf);
CFIndex i;
for (i=0; i < 3; i++) {
Expand Down Expand Up @@ -278,7 +274,7 @@ CF_INLINE void __CFStorageSetCache(CFStorageRef storage, CFStorageNode *node, CF
/* Gets the location for the specified absolute loc from the cached info.
Returns NULL if the location is not in the cache.
*/
CF_INLINE uint8_t *__CFStorageGetFromCache(CFStorageRef storage, CFIndex loc, CFRange * restrict validConsecutiveValueRange, bool requireUnfrozenNode) {
CF_INLINE uint8_t *__CFStorageGetFromCache(CFStorageRef storage, CFIndex loc, CFRange * __restrict validConsecutiveValueRange, bool requireUnfrozenNode) {
CFStorageNode * const cachedNode = storage->cacheNode; /* It's important we read from this field no more than once, for thread safety with other concurrent reads; that is why the field is marked volatile. */
if (! cachedNode) return NULL; /* No cache */

Expand Down Expand Up @@ -313,7 +309,7 @@ CF_INLINE uint8_t *__CFStorageGetFromCache(CFStorageRef storage, CFIndex loc, CF
relativeByteNum (not optional, for performance reasons) returns the relative byte number of the specified byte in the child.
Don't call with leaf nodes!
*/
CF_INLINE CFStorageNode *__CFStorageFindChild(const CFStorageNode * restrict node, CFIndex byteNum, bool forInsertionOrDeletion, CFIndex * restrict childNum, CFIndex * restrict relativeByteNum) {
CF_INLINE CFStorageNode *__CFStorageFindChild(const CFStorageNode * __restrict node, CFIndex byteNum, bool forInsertionOrDeletion, CFIndex * __restrict childNum, CFIndex * __restrict relativeByteNum) {
if (forInsertionOrDeletion) byteNum--; /* If for insertion, we do <= checks, not <, so this accomplishes the same thing */
CFStorageNode *result;
result = node->info.notLeaf.child[0];
Expand Down