@@ -167,7 +167,7 @@ struct FileMappingHint {
167167// We are using SpinLock and not a Mutex here, because we may be called
168168// from inside Mutex::Lock itself, and it prohibits recursive calls.
169169// This happens in e.g. base/stacktrace_syscall_unittest.
170- // Moreover, we are using only TryLock (), if the decorator list
170+ // Moreover, we are using only try_lock (), if the decorator list
171171// is being modified (is busy), we skip all decorators, and possibly
172172// loose some info. Sorry, that's the best we could do.
173173ABSL_CONST_INIT absl ::base_internal ::SpinLock g_decorators_mu (
@@ -1549,7 +1549,7 @@ const char *Symbolizer::GetUncachedSymbol(const void *pc) {
15491549# endif
15501550 }
15511551
1552- if (g_decorators_mu.TryLock ()) {
1552+ if (g_decorators_mu.try_lock ()) {
15531553 if (g_num_decorators > 0 ) {
15541554 SymbolDecoratorArgs decorator_args = {
15551555 pc, relocation, fd, symbol_buf_, sizeof (symbol_buf_),
@@ -1559,7 +1559,7 @@ const char *Symbolizer::GetUncachedSymbol(const void *pc) {
15591559 g_decorators[i].fn (& decorator_args);
15601560 }
15611561 }
1562- g_decorators_mu.Unlock ();
1562+ g_decorators_mu.unlock ();
15631563 }
15641564 if (symbol_buf_[0 ] == ' \0' ) {
15651565 return nullptr;
@@ -1605,17 +1605,17 @@ const char *Symbolizer::GetSymbol(const void *pc) {
16051605}
16061606
16071607bool RemoveAllSymbolDecorators (void) {
1608- if (! g_decorators_mu.TryLock ()) {
1608+ if (! g_decorators_mu.try_lock ()) {
16091609 // Someone else is using decorators. Get out.
16101610 return false ;
16111611 }
16121612 g_num_decorators = 0 ;
1613- g_decorators_mu.Unlock ();
1613+ g_decorators_mu.unlock ();
16141614 return true ;
16151615}
16161616
16171617bool RemoveSymbolDecorator (int ticket) {
1618- if (! g_decorators_mu.TryLock ()) {
1618+ if (! g_decorators_mu.try_lock ()) {
16191619 // Someone else is using decorators. Get out.
16201620 return false ;
16211621 }
@@ -1629,14 +1629,14 @@ bool RemoveSymbolDecorator(int ticket) {
16291629 break ;
16301630 }
16311631 }
1632- g_decorators_mu.Unlock ();
1632+ g_decorators_mu.unlock ();
16331633 return true ; // Decorator is known to be removed.
16341634}
16351635
16361636int InstallSymbolDecorator (SymbolDecorator decorator, void * arg) {
16371637 static int ticket = 0 ;
16381638
1639- if (! g_decorators_mu.TryLock ()) {
1639+ if (! g_decorators_mu.try_lock ()) {
16401640 // Someone else is using decorators. Get out.
16411641 return - 2 ;
16421642 }
@@ -1647,7 +1647,7 @@ int InstallSymbolDecorator(SymbolDecorator decorator, void *arg) {
16471647 g_decorators[g_num_decorators] = {decorator, arg, ticket++ };
16481648 ++ g_num_decorators;
16491649 }
1650- g_decorators_mu.Unlock ();
1650+ g_decorators_mu.unlock ();
16511651 return ret;
16521652}
16531653
@@ -1658,7 +1658,7 @@ bool RegisterFileMappingHint(const void *start, const void *end,
16581658
16591659 base_internal ::InitSigSafeArena ();
16601660
1661- if (! g_file_mapping_mu.TryLock ()) {
1661+ if (! g_file_mapping_mu.try_lock ()) {
16621662 return false ;
16631663 }
16641664
@@ -1681,13 +1681,13 @@ bool RegisterFileMappingHint(const void *start, const void *end,
16811681 hint.filename = dst;
16821682 }
16831683
1684- g_file_mapping_mu.Unlock ();
1684+ g_file_mapping_mu.unlock ();
16851685 return ret;
16861686}
16871687
16881688bool GetFileMappingHint (const void ** start, const void ** end, uint64_t * offset,
16891689 const char ** filename) {
1690- if (! g_file_mapping_mu.TryLock ()) {
1690+ if (! g_file_mapping_mu.try_lock ()) {
16911691 return false ;
16921692 }
16931693 bool found = false ;
@@ -1710,7 +1710,7 @@ bool GetFileMappingHint(const void **start, const void **end, uint64_t *offset,
17101710 break ;
17111711 }
17121712 }
1713- g_file_mapping_mu.Unlock ();
1713+ g_file_mapping_mu.unlock ();
17141714 return found;
17151715}
17161716
0 commit comments