Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move import of stdatomic to ASRecursiveUnfairLock implementation file #trivial #1180

Merged
merged 1 commit into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
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
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