Skip to content

Commit

Permalink
Merge pull request #44 from flang-compiler/sles11
Browse files Browse the repository at this point in the history
Change for SLES 11 support.
  • Loading branch information
sscalpone authored Sep 7, 2018
2 parents 3984416 + d49bbf4 commit d8b3008
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Support/Unix/Threading.inc
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ void llvm::set_thread_name(const Twine &Name) {
if (get_max_thread_name_length() > 0)
NameStr = NameStr.take_back(get_max_thread_name_length());
(void)NameStr;
#if 0
#if defined(__linux__)
#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
#if HAVE_PTHREAD_SETNAME_NP
Expand All @@ -155,6 +156,7 @@ void llvm::set_thread_name(const Twine &Name) {
#elif defined(__APPLE__)
::pthread_setname_np(NameStr.data());
#endif
#endif
}

void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
Expand Down Expand Up @@ -203,6 +205,7 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {

Name.append(buf, buf + strlen(buf));
#elif defined(__linux__)
#if 0
#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
#if HAVE_PTHREAD_GETNAME_NP
constexpr uint32_t len = get_max_thread_name_length_impl();
Expand All @@ -212,4 +215,5 @@ void llvm::get_thread_name(SmallVectorImpl<char> &Name) {
#endif
#endif
#endif
#endif
}

0 comments on commit d8b3008

Please sign in to comment.