Changeset 232599 in webkit
- Timestamp:
- Jun 7, 2018 2:05:29 PM (6 years ago)
- Location:
- trunk/Source/bmalloc
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/bmalloc/ChangeLog
r232269 r232599 1 2018-06-07 David Kilzer <ddkilzer@apple.com> 2 3 bmalloc: Fix 'noreturn' warnings when compiling with -std=gnu++17 4 <https://webkit.org/b/186400> 5 6 Reviewed by Saam Barati. 7 8 Fixes the following warnings when compiling with gnu++17: 9 10 Source/bmalloc/bmalloc/Scavenger.cpp:363:1: error: function 'threadRunLoop' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn] 11 { 12 ^ 13 Source/bmalloc/bmalloc/Scavenger.cpp:358:1: error: function 'threadEntryPoint' could be declared with attribute 'noreturn' [-Werror,-Wmissing-noreturn] 14 { 15 ^ 16 17 * bmalloc/BCompiler.h: 18 (BCOMPILER): Add support for the BCOMPILER() macro, then add 19 BCOMPILER(GCC_OR_CLANG). Taken from Source/WTF/wtf/Compiler.h. 20 (BNO_RETURN): Implement 'norerturn' support using the new 21 BCOMPILER() macros. Taken from Source/WTF/wtf/Compiler.h. 22 * bmalloc/Scavenger.cpp: 23 (bmalloc::Scavenger::threadRunLoop): Remove the workaround that 24 tricked older compilers into thinking the while() loop wasn't 25 infinite. 26 * bmalloc/Scavenger.h: 27 (bmalloc::Scavenger::threadEntryPoint): Add BNO_RETURN attribute. 28 (bmalloc::Scavenger::threadRunLoop): Ditto. 29 1 30 2018-05-29 Saam Barati <sbarati@apple.com> 2 31 -
trunk/Source/bmalloc/bmalloc/BCompiler.h
r232069 r232599 26 26 #pragma once 27 27 28 /* BCOMPILER() - the compiler being used to build the project */ 29 #define BCOMPILER(BFEATURE) (defined BCOMPILER_##BFEATURE && BCOMPILER_##BFEATURE) 30 28 31 /* BCOMPILER_HAS_CLANG_FEATURE() - whether the compiler supports a particular language or library feature. */ 29 32 /* http://clang.llvm.org/docs/LanguageExtensions.html#has-feature-and-has-extension */ … … 36 39 #define BASAN_ENABLED BCOMPILER_HAS_CLANG_FEATURE(address_sanitizer) 37 40 41 /* BCOMPILER(GCC_OR_CLANG) - GNU Compiler Collection or Clang */ 42 43 #if defined(__GNUC__) 44 #define BCOMPILER_GCC_OR_CLANG 1 45 #endif 46 47 /* BNO_RETURN */ 48 49 #if !defined(BNO_RETURN) && BCOMPILER(GCC_OR_CLANG) 50 #define BNO_RETURN __attribute((__noreturn__)) 51 #endif 52 53 #if !defined(BNO_RETURN) 54 #define BNO_RETURN 55 #endif 56 -
trunk/Source/bmalloc/bmalloc/Scavenger.cpp
r232269 r232599 375 375 // condition variable and wake us up. 376 376 377 auto truth = [] { return true; }; 378 379 while (truth()) { 377 while (true) { 380 378 if (m_state == State::Sleep) { 381 379 std::unique_lock<Mutex> lock(m_mutex); -
trunk/Source/bmalloc/bmalloc/Scavenger.h
r232269 r232599 83 83 void scheduleIfUnderMemoryPressureHoldingLock(size_t bytes); 84 84 85 static void threadEntryPoint(Scavenger*);86 void threadRunLoop();85 BNO_RETURN static void threadEntryPoint(Scavenger*); 86 BNO_RETURN void threadRunLoop(); 87 87 88 88 void setSelfQOSClass();
Note: See TracChangeset
for help on using the changeset viewer.