Merge remote-tracking branch 'origin/master' into pico_sdk
# Conflicts: # libs/main/io_devices/pidir.cpp # libs/main/io_devices/pifile.cpp # libs/main/thread/pithread.cpp
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
|
||||
const PIChar PIDir::separator = '/';
|
||||
# ifdef QNX
|
||||
# if defined(QNX) || !(defined(MAC_OS) || defined(__GLIBC__) || defined(_WIN32))
|
||||
# define _stat_struct_ struct stat
|
||||
# define _stat_call_ stat
|
||||
# define _stat_link_ lstat
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
# define _fseek_call_ fseek
|
||||
# define _ftell_call_ ftell
|
||||
# else
|
||||
# ifdef CC_GCC
|
||||
# if defined(CC_GCC) && (defined(__GLIBC__) || defined(_WIN32))
|
||||
# define _fopen_call_ fopen64
|
||||
# define _fseek_call_ fseeko64
|
||||
# define _ftell_call_ ftello64
|
||||
@@ -69,9 +69,15 @@
|
||||
# define _ftell_call_ ftell
|
||||
# endif
|
||||
# endif
|
||||
# define _stat_struct_ struct stat64
|
||||
# define _stat_call_ stat64
|
||||
# define _stat_link_ lstat64
|
||||
# if defined(MAC_OS) || defined(__GLIBC__) || defined(_WIN32)
|
||||
# define _stat_struct_ struct stat64
|
||||
# define _stat_call_ stat64
|
||||
# define _stat_link_ lstat64
|
||||
# else
|
||||
# define _stat_struct_ struct stat
|
||||
# define _stat_call_ stat
|
||||
# define _stat_link_ lstat
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
|
||||
@@ -160,9 +160,11 @@ inline int pow2 (const int p ) {return 1 << p;}
|
||||
//! \~russian Возвращает `10` в указанной степени.
|
||||
inline float pow10(const float & e) {return powf(10.f, e);}
|
||||
|
||||
#if !defined(__linux__) || defined(__GLIBC__) || defined(__BIONIC__)
|
||||
//! \~english Returns `10` raised to the specified power.
|
||||
//! \~russian Возвращает `10` в указанной степени.
|
||||
inline double pow10(const double & e) {return pow (10. , e);}
|
||||
#endif
|
||||
|
||||
//! \~english Returns `10` raised to the specified power.
|
||||
//! \~russian Возвращает `10` в указанной степени.
|
||||
|
||||
@@ -785,10 +785,10 @@ void PIThread::setPriority(PIThread::Priority prior) {
|
||||
piZeroMemory(PRIVATE->sparam);
|
||||
pthread_getschedparam(PRIVATE->thread, &policy_, &(PRIVATE->sparam));
|
||||
PRIVATE->sparam.
|
||||
# ifndef LINUX
|
||||
sched_priority
|
||||
# else
|
||||
# if defined(LINUX) && defined(__GLIBC__)
|
||||
__sched_priority
|
||||
# else
|
||||
sched_priority
|
||||
# endif
|
||||
= priority2System(priority_);
|
||||
pthread_setschedparam(PRIVATE->thread, policy_, &(PRIVATE->sparam));
|
||||
@@ -1054,7 +1054,7 @@ void PIThread::setThreadName() {
|
||||
pthread_setname_np((const char *)name_ba.data());
|
||||
pthread_threadid_np(PRIVATE->thread, (__uint64_t *)&tid_);
|
||||
# else
|
||||
pthread_setname_np(PRIVATE->thread, (const char *)name_ba.data());
|
||||
pthread_setname_np(pthread_self(), (const char *)name_ba.data());
|
||||
# endif
|
||||
# endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user