diff --git a/cmake/modules/FindVolk.cmake b/cmake/modules/FindVolk.cmake index 7228c4f64..47ea99e4a 100644 --- a/cmake/modules/FindVolk.cmake +++ b/cmake/modules/FindVolk.cmake @@ -5,7 +5,7 @@ FIND_PATH( VOLK_INCLUDE_DIRS NAMES volk.h HINTS $ENV{VOLK_DIR}/include/volk - ${CMAKE_INSTALL_PREFIX}/include/volk + ${CMAKE_INSTALL_PREFIX}/include/volk ${PC_VOLK_INCLUDE_DIR} PATHS /usr/local/include/volk /usr/include/volk @@ -15,9 +15,9 @@ FIND_LIBRARY( VOLK_LIBRARIES NAMES volk HINTS $ENV{VOLK_DIR}/lib - ${CMAKE_INSTALL_PREFIX}/lib - ${CMAKE_INSTALL_PREFIX}/lib64 - ${PC_VOLK_LIBDIR} + ${CMAKE_INSTALL_PREFIX}/lib + ${CMAKE_INSTALL_PREFIX}/lib64 + ${PC_VOLK_LIBDIR} PATHS /usr/local/lib /usr/local/lib64 /usr/lib @@ -154,4 +154,4 @@ IF(VOLK_FOUND) IF(${HAVE_VOLK_ATAN_FUNCTION}) SET(VOLK_DEFINITIONS "${VOLK_DEFINITIONS}; HAVE_VOLK_ATAN_FUNCTION") ENDIF() -ENDIF(VOLK_FOUND) \ No newline at end of file +ENDIF(VOLK_FOUND) diff --git a/srsapps/common/include/srsapps/common/log.h b/srsapps/common/include/srsapps/common/log.h index 94d764509..f0edc7fb2 100644 --- a/srsapps/common/include/srsapps/common/log.h +++ b/srsapps/common/include/srsapps/common/log.h @@ -45,15 +45,13 @@ #define Info(fmt, ...) log_h->info(__FILE__, __LINE__, fmt, ##__VA_ARGS__) #define Debug(fmt, ...) log_h->debug(__FILE__, __LINE__, fmt, ##__VA_ARGS__) -using namespace std; - namespace srslte { class log { public: - log(string service_name_) { service_name = service_name_; tti = 0; level = LOG_LEVEL_NONE; } + log(std::string service_name_) { service_name = service_name_; tti = 0; level = LOG_LEVEL_NONE; } // This function shall be called at the start of every tti for printing tti void step(uint32_t tti_) { @@ -74,23 +72,23 @@ public: } // Pure virtual methods for logging - virtual void error(string message, ...) = 0; - virtual void warning(string message, ...) = 0; - virtual void info(string message, ...) = 0; - virtual void debug(string message, ...) = 0; + virtual void error(std::string message, ...) = 0; + virtual void warning(std::string message, ...) = 0; + virtual void info(std::string message, ...) = 0; + virtual void debug(std::string message, ...) = 0; // Same with line and file info - virtual void error(string file, int line, string message, ...) = 0; - virtual void warning(string file, int line, string message, ...) = 0; - virtual void info(string file, int line, string message, ...) = 0; - virtual void debug(string file, int line, string message, ...) = 0; + virtual void error(std::string file, int line, std::string message, ...) = 0; + virtual void warning(std::string file, int line, std::string message, ...) = 0; + virtual void info(std::string file, int line, std::string message, ...) = 0; + virtual void debug(std::string file, int line, std::string message, ...) = 0; protected: - string get_service_name() { return service_name; } + std::string get_service_name() { return service_name; } uint32_t tti; log_level_t level; private: - string service_name; + std::string service_name; }; } diff --git a/srsapps/common/src/threads.c b/srsapps/common/src/threads.c index 2ffedeaaa..25b5d42f6 100644 --- a/srsapps/common/src/threads.c +++ b/srsapps/common/src/threads.c @@ -64,7 +64,11 @@ bool threads_new_rt_cpu(pthread_t *thread, void *(*start_routine) (void*), void perror("pthread_attr_setaffinity_np"); } } - if (pthread_create(thread, &attr, start_routine, arg)) { + int err = pthread_create(thread, &attr, start_routine, arg); + if (err) { + if (1 == err) { + perror("Failed to create thread - permission error. Running with root permissions?"); + } perror("pthread_create"); } else { ret = true;