Skip to content

Commit

Permalink
Move import of stdatomic to ASRecursiveUnfairLock implementation file (
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki committed Oct 19, 2018
1 parent 2f3c0b4 commit dc49ce0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Source/Details/ASRecursiveUnfairLock.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
#import <pthread/pthread.h>
#import <os/lock.h>

// Don't import C-only header if we're in a C++ file
#ifndef __cplusplus
#import <stdatomic.h>
#endif

// Note: We don't use ATOMIC_VAR_INIT here because C++ compilers don't like it,
// and it literally does absolutely nothing.
#define AS_RECURSIVE_UNFAIR_LOCK_INIT ((ASRecursiveUnfairLock){ OS_UNFAIR_LOCK_INIT, NULL, 0})
Expand Down
2 changes: 2 additions & 0 deletions Source/Details/ASRecursiveUnfairLock.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "ASRecursiveUnfairLock.h"

#import <stdatomic.h>

/**
* For our atomic _thread, we use acquire/release memory order so that we can have
* the minimum possible constraint on the hardware. The default, `memory_order_seq_cst`
Expand Down

0 comments on commit dc49ce0

Please sign in to comment.