-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
fix compiling errors on AIX #2181
Conversation
The doc states that “ If your code requires the unique integer identifier for the calling thread often, or in a loop, the pthread_getthreadid_np() function can provide significant performance improvements over the combination of pthread_self(), and pthread_getunique_np() calls that provide equivalent behavior. |
Hi @gabime , The doc link you referred to is for I've made a new commit to use
it's better than
|
Thanks for clarifying.It would be interesting to perform a quick bench for this implementation: mkdir build && cd build && cmake -DSPDLOG_BUILD_BENCH=1 ..
cd bench && ./formatter-bench %t |
On same aforementioned AIX environment, here is the command line to compile
and this is the output:
BTW, I just pushed another commit as the
|
Merged. Thanks @lisr |
What
spdlog failed to compile on
AIX 7.2
with following configurations
Code Change
fileno
is a macro on AIX, so we cannot use::
scope decorator for this function.pthread_self + pthread_getthrds_np
instead ofpthread_getthreadid_np
See AIX DocEnvironment